!2650 get monitor sampling interval from json file

Merge pull request !2650 from yanghaitao/yht_sampling_interval_r0.5
This commit is contained in:
mindspore-ci-bot 2020-06-28 20:05:11 +08:00 committed by Gitee
commit 269b514b05
4 changed files with 6 additions and 3 deletions

View File

@ -41,6 +41,7 @@ Status ConfigManager::FromJson(const nlohmann::json &j) {
set_worker_connector_size(j.value("workerConnectorSize", worker_connector_size_));
set_op_connector_size(j.value("opConnectorSize", op_connector_size_));
set_seed(j.value("seed", seed_));
set_monitor_sampling_interval(j.value("monitorSamplingInterval", monitor_sampling_interval_));
return Status::OK();
}

View File

@ -185,7 +185,8 @@ class ConfigurationManager:
>>> # "numParallelWorkers": 4,
>>> # "workerConnectorSize": 16,
>>> # "opConnectorSize": 16,
>>> # "seed": 5489
>>> # "seed": 5489,
>>> # "monitorSamplingInterval": 30
>>> # }
"""
self.config.load(file)

View File

@ -4,6 +4,6 @@
"numParallelWorkers": 4,
"workerConnectorSize": 16,
"opConnectorSize": 16,
"seed": 5489
"seed": 5489,
"monitorSamplingInterval": 15
}

View File

@ -45,6 +45,7 @@ def test_basic():
# assert ds.config.get_worker_connector_size() == 16
assert ds.config.get_prefetch_size() == 16
assert ds.config.get_seed() == 5489
assert ds.config.get_monitor_sampling_interval() == 15
# ds.config.set_rows_per_buffer(1)
ds.config.set_num_parallel_workers(2)