forked from mindspore-Ecosystem/mindspore
set monitor sampling interval through json file
This commit is contained in:
parent
5a886794da
commit
fd701b8504
|
@ -41,7 +41,7 @@ Status ConfigManager::FromJson(const nlohmann::json &j) {
|
||||||
set_worker_connector_size(j.value("workerConnectorSize", worker_connector_size_));
|
set_worker_connector_size(j.value("workerConnectorSize", worker_connector_size_));
|
||||||
set_op_connector_size(j.value("opConnectorSize", op_connector_size_));
|
set_op_connector_size(j.value("opConnectorSize", op_connector_size_));
|
||||||
set_seed(j.value("seed", seed_));
|
set_seed(j.value("seed", seed_));
|
||||||
set_monitor_sampling_interval(j.value("monitorSamplingInterval"));
|
set_monitor_sampling_interval(j.value("monitorSamplingInterval", monitor_sampling_interval_));
|
||||||
return Status::OK();
|
return Status::OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ class ConfigurationManager:
|
||||||
>>> # "workerConnectorSize": 16,
|
>>> # "workerConnectorSize": 16,
|
||||||
>>> # "opConnectorSize": 16,
|
>>> # "opConnectorSize": 16,
|
||||||
>>> # "seed": 5489,
|
>>> # "seed": 5489,
|
||||||
>>> # "monitorSamplingInterval": 30
|
>>> # "monitorSamplingInterval": 30
|
||||||
>>> # }
|
>>> # }
|
||||||
"""
|
"""
|
||||||
self.config.load(file)
|
self.config.load(file)
|
||||||
|
|
|
@ -5,6 +5,5 @@
|
||||||
"workerConnectorSize": 16,
|
"workerConnectorSize": 16,
|
||||||
"opConnectorSize": 16,
|
"opConnectorSize": 16,
|
||||||
"seed": 5489,
|
"seed": 5489,
|
||||||
"monitor_sampling_interval": 15
|
"monitorSamplingInterval": 15
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ def test_basic():
|
||||||
# assert ds.config.get_worker_connector_size() == 16
|
# assert ds.config.get_worker_connector_size() == 16
|
||||||
assert ds.config.get_prefetch_size() == 16
|
assert ds.config.get_prefetch_size() == 16
|
||||||
assert ds.config.get_seed() == 5489
|
assert ds.config.get_seed() == 5489
|
||||||
# assert ds.config.get_monitor_sampling_interval() == 15
|
assert ds.config.get_monitor_sampling_interval() == 15
|
||||||
|
|
||||||
# ds.config.set_rows_per_buffer(1)
|
# ds.config.set_rows_per_buffer(1)
|
||||||
ds.config.set_num_parallel_workers(2)
|
ds.config.set_num_parallel_workers(2)
|
||||||
|
|
Loading…
Reference in New Issue