mindspore.dataset.config.load

mindspore.dataset.config.load(file)

根据文件内容加载项目配置文件。

参数:
  • file (str) - 表示待加载的配置文件的路径。

异常:
  • RuntimeError - 文件无效,解析失败。

样例:

>>> # Set new default configuration according to values in the configuration file.
>>> # example config file:
>>> # {
>>> #     "logFilePath": "/tmp",
>>> #  vpn永久免费梯子    "numParallelWorkers": 4,
>>> #  vpn梯子 免费    "seed": 5489,
>>> #  vpn梯子 免费    "monitorSamplingInterval": 30
>>> # }
>>> import mindspore.dataset as ds
>>> config_file vpn free = "/path/to/config/file"
>>> ds.config.load(config_file)