mindspore.dataset.config.set_multiprocessing_timeout_interval

mindspore.dataset.config.set_multiprocessing_timeout_interval(interval)

Set the default interval (in seconds) for multiprocessing/multithreading timeout when main process/thread gets data from subprocesses/child threads.

Parameters

interval (int) – Interval (in seconds) to be used for multiprocessing/multithreading timeout when main process/thread gets data from subprocess/child threads.

Raises
  • TypeError – If interval is not of type int.

  • ValueError – If interval <= 0 or interval > INT32_MAX(2147483647).

Examples

>>> # Set a new global configuration value for multiprocessing/multithreading timeout when getting data.
>>> import mindspore.dataset as ds
>>> ds.config.set_multiprocessing_timeout_interval(300)