From c76c3f5cac8a605ff0e1b9cde112cf8ad6d208f8 Mon Sep 17 00:00:00 2001 From: Superjom Date: Sun, 17 Dec 2017 11:45:53 +0800 Subject: [PATCH] code clean --- visualdl/logic/im.cc | 21 --------------------- visualdl/python/summary.py | 12 ------------ 2 files changed, 33 deletions(-) diff --git a/visualdl/logic/im.cc b/visualdl/logic/im.cc index 94881244..624fbfbb 100644 --- a/visualdl/logic/im.cc +++ b/visualdl/logic/im.cc @@ -25,27 +25,6 @@ int ReserviorSample(int num_samples, int num_records) { return -1; } -// IM::IM(StorageBase::Type type, StorageBase::Mode mode) { -// switch (type) { -// case StorageBase::Type::kMemory: { -// storage_.reset(new MemoryStorage); -// } break; -// default: -// CHECK(false) << "Unsupported storage kind " << type; -// } - -// switch (mode) { -// case StorageBase::Mode::kRead: -// dynamic_cast(storage_.get())->StartReadService(500); -// break; -// case StorageBase::Mode::kWrite: -// dynamic_cast(storage_.get())->StartWriteSerice(500); -// break; -// default: -// break; -// } -// } - void IM::SetPersistDest(const std::string &path) { CHECK(storage_->mutable_data()->dir().empty()) << "duplicate set storage's path"; diff --git a/visualdl/python/summary.py b/visualdl/python/summary.py index 19a459b6..db9cb1d2 100644 --- a/visualdl/python/summary.py +++ b/visualdl/python/summary.py @@ -103,15 +103,3 @@ def scalar(im, tag, dtype='float'): } obj = dtype2obj[dtype](im) return _Scalar(obj) - - -# def read_scalar(tag, dtype='float'): -# tablet = core.im().tablet(tag) -# dtype2obj = { -# 'float': tablet.as_float_scalar, -# 'double': tablet.as_double_scalar, -# 'int32': tablet.as_int32_scalar, -# 'int64': tablet.as_int64_scalar, -# } -# obj = dtype2obj[dtype]() -# return _Scalar(obj) -- GitLab