diff --git a/mindspore/ccsrc/dataset/core/config_manager.cc b/mindspore/ccsrc/dataset/core/config_manager.cc index 9ca7ecc91b28735fb0277dbe806b897b1d19ca96..9291a8f832de2c5d69ead553cb3e490aa9b5ae96 100644 --- a/mindspore/ccsrc/dataset/core/config_manager.cc +++ b/mindspore/ccsrc/dataset/core/config_manager.cc @@ -41,7 +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")); + set_monitor_sampling_interval(j.value("monitorSamplingInterval", monitor_sampling_interval_)); return Status::OK(); } diff --git a/mindspore/dataset/core/configuration.py b/mindspore/dataset/core/configuration.py index 99d83dbdf710fbf695c9cadbe9f3b2675102b61a..5376c668c40dbe5c1eb35d55e57b62f5c888ebac 100644 --- a/mindspore/dataset/core/configuration.py +++ b/mindspore/dataset/core/configuration.py @@ -186,7 +186,7 @@ class ConfigurationManager: >>> # "workerConnectorSize": 16, >>> # "opConnectorSize": 16, >>> # "seed": 5489, - >>> # "monitorSamplingInterval": 30 + >>> # "monitorSamplingInterval": 30 >>> # } """ self.config.load(file) diff --git a/tests/ut/data/dataset/declient.cfg b/tests/ut/data/dataset/declient.cfg index e09b24812ad94a36a1cc3980cb1b4a42d4244338..36ca5ec3d96d3df7c46e47bb33604bdb48e1134f 100644 --- a/tests/ut/data/dataset/declient.cfg +++ b/tests/ut/data/dataset/declient.cfg @@ -5,6 +5,5 @@ "workerConnectorSize": 16, "opConnectorSize": 16, "seed": 5489, - "monitor_sampling_interval": 15 - + "monitorSamplingInterval": 15 } diff --git a/tests/ut/python/dataset/test_config.py b/tests/ut/python/dataset/test_config.py index 59be886c23ddcd8a5c30d563e11dbe86c7363749..f8322a5935da8f698383a12f392fc265223e490a 100644 --- a/tests/ut/python/dataset/test_config.py +++ b/tests/ut/python/dataset/test_config.py @@ -46,7 +46,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 + assert ds.config.get_monitor_sampling_interval() == 15 # ds.config.set_rows_per_buffer(1) ds.config.set_num_parallel_workers(2)