mindspore.dataset.config.set_multiprocessing_timeout_interval

View Source On AtomGit
mindspore.dataset.config.set_multiprocessing_timeout_interval(interval)

In a multi-process/multi-threaded environment, the default interval (in seconds) at which an alert log is printed when the main process/main thread times out while retrieving data.

Parameters:

interval (int) – Specifies the interval (in seconds) at which an alert log is printed when the main process or main thread times out while retrieving data in a multi-process or multi-threaded environment.

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)