diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake index 76d16c254147dc6df89e40ba3241b02c41a37bbb..ec687ac708982ed9aa215849ac5eb703e8d33be6 100644 --- a/cmake/external/protobuf.cmake +++ b/cmake/external/protobuf.cmake @@ -184,7 +184,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ${EXTERNAL_PROJECT_LOG_ARGS} PREFIX ${PROTOBUF_SOURCES_DIR} UPDATE_COMMAND "" - URL https://github.com/google/protobuf/archive/v3.5.2.zip + URL https://github.com/google/protobuf/archive/v3.1.0.zip CONFIGURE_COMMAND ${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/${TARGET_NAME}/cmake ${OPTIONAL_ARGS} @@ -210,7 +210,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) PREFIX ${PROTOBUF_SOURCES_DIR} UPDATE_COMMAND "" DEPENDS zlib - URL https://github.com/google/protobuf/archive/v3.5.2.zip + URL https://github.com/google/protobuf/archive/v3.1.0.zip CONFIGURE_COMMAND ${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/${TARGET_NAME}/cmake ${OPTIONAL_ARGS} @@ -229,7 +229,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ENDIF(MSVC) ENDFUNCTION() -SET(PROTOBUF_VERSION 3.5) +SET(PROTOBUF_VERSION 3.1) IF(CMAKE_CROSSCOMPILING) build_protobuf(protobuf_host TRUE) LIST(APPEND external_project_dependencies protobuf_host) diff --git a/requirements.txt b/requirements.txt index cc713def45f19c69e7c6555d046891c30d0e5e12..d5b6935a8908f5910c0c83140ba2d89cd2c00849 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,4 @@ Pillow==5.0.0 pre-commit==1.5.1 flask==0.12.2 six==1.11.0 -protobuf==3.5.1 +protobuf>=3.1.0 diff --git a/setup.py b/setup.py index 570fba1f1ee7cc558b2fb164d8a3fdd3a0c9baf5..b20ce455064bff127a39690b75868f1ff49ad444 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ VERSION_NUMBER = read('VERSION_NUMBER') LICENSE = readlines('LICENSE')[0].strip() # use memcache to reduce disk read frequency. -install_requires = ['Flask', 'numpy', 'Pillow', 'protobuf', 'scipy'] +install_requires = ['Flask', 'numpy', 'Pillow', 'protobuf >= 3.1.0', 'scipy'] execute_requires = ['npm', 'node', 'bash', 'cmake', 'unzip'] if platform == "win32": execute_requires = ['node', 'powershell', 'cmake'] diff --git a/visualdl/storage/storage.cc b/visualdl/storage/storage.cc index 8dc4acdc8eb565d8d1ec3ff95bea5925cbe6a377..cb505d583480acc2551339349adcbb184453f171 100644 --- a/visualdl/storage/storage.cc +++ b/visualdl/storage/storage.cc @@ -21,7 +21,7 @@ Storage::Storage() { data_ = std::make_shared(); tablets_ = std::make_shared>(); modes_ = std::make_shared>(); - modified_tablet_set_ = std::unordered_set(); + modified_tablet_set_ = std::set(); time_t t; time(&t); data_->set_timestamp(t); diff --git a/visualdl/storage/storage.h b/visualdl/storage/storage.h index 2b4fc099ab71a2b8ff1f3786fab371c1e684a5d7..fb2ee9e31ef1fd1d5bbacc1b28d12b2018c34d9e 100644 --- a/visualdl/storage/storage.h +++ b/visualdl/storage/storage.h @@ -90,7 +90,7 @@ private: std::shared_ptr> tablets_; std::shared_ptr data_; std::shared_ptr> modes_; - std::unordered_set modified_tablet_set_; + std::set modified_tablet_set_; }; // Storage reader, each method will trigger a reading from disk.