Function mindspore::dataset::config::load

Function Documentation

inline bool mindspore::dataset::config::load(const std::string &file)

A function to load the configuration from a file.

Example
// Set new default configuration according to values in the configuration file.
// example config file:
// {
//     "logFilePath": "/tmp",
//     "numParallelWorkers": 4,
//     "seed": 5489,
//     "monitorSamplingInterval": 30
// }
std::string config_file = "/path/to/config/file";
bool rc = config::load(config_file);

参数

file[in] Path of the configuration file to be loaded.

返回

The config file is loaded successfully or not.