From 99283fb48034ed6d947e5b89f2d4800f0709b627 Mon Sep 17 00:00:00 2001 From: wuzewu Date: Thu, 13 Dec 2018 16:24:46 +0800 Subject: [PATCH] change the protobuf version to 3.1.0 (#518) --- cmake/external/protobuf.cmake | 6 +++--- requirements.txt | 2 +- setup.py | 2 +- visualdl/storage/storage.cc | 2 +- visualdl/storage/storage.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake index 76d16c25..ec687ac7 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 cc713def..d5b6935a 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 570fba1f..b20ce455 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 8dc4acdc..cb505d58 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 2b4fc099..fb2ee9e3 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. -- GitLab