ray.train.RunConfig#

class ray.train.RunConfig(name: str | None = None, storage_path: str | None = None, storage_filesystem: pyarrow.fs.FileSystem | None = None, failure_config: FailureConfig | None = None, checkpoint_config: CheckpointConfig | None = None, sync_config: SyncConfig | None = None, verbose: int | AirVerbosity | Verbosity | None = None, stop: Mapping | Stopper | Callable[[str, Mapping], bool] | None = None, callbacks: List[Callback] | None = None, progress_reporter: ray.tune.progress_reporter.ProgressReporter | None = None, log_to_file: bool | str | Tuple[str, str] = False, local_dir: str | None = None)#

Runtime configuration for training and tuning runs.

Upon resuming from a training or tuning run checkpoint, Ray Train/Tune will automatically apply the RunConfig from the previously checkpointed run.

Parameters:
  • name – Name of the trial or experiment. If not provided, will be deduced from the Trainable.

  • storage_path – [Beta] Path where all results and checkpoints are persisted. Can be a local directory or a destination on cloud storage. For multi-node training/tuning runs, this must be set to a shared storage location (e.g., S3, NFS). This defaults to the local ~/ray_results directory.

  • storage_filesystem – [Beta] A custom filesystem to use for storage. If this is provided, storage_path should be a path with its prefix stripped (e.g., s3://bucket/path -> bucket/path).

  • failure_config – Failure mode configuration.

  • checkpoint_config – Checkpointing configuration.

  • sync_config – Configuration object for syncing. See train.SyncConfig.

  • verbose – 0, 1, or 2. Verbosity mode. 0 = silent, 1 = default, 2 = verbose. Defaults to 1. If the RAY_AIR_NEW_OUTPUT=1 environment variable is set, uses the old verbosity settings: 0 = silent, 1 = only status updates, 2 = status and brief results, 3 = status and detailed results.

  • stop – Stop conditions to consider. Refer to ray.tune.stopper.Stopper for more info. Stoppers should be serializable.

  • callbacks – [DeveloperAPI] Callbacks to invoke. Refer to ray.tune.callback.Callback for more info. Callbacks should be serializable. Currently only stateless callbacks are supported for resumed runs. (any state of the callback will not be checkpointed by Tune and thus will not take effect in resumed runs).

  • progress_reporter – [DeveloperAPI] Progress reporter for reporting intermediate experiment progress. Defaults to CLIReporter if running in command-line, or JupyterNotebookReporter if running in a Jupyter notebook.

  • log_to_file – [DeveloperAPI] Log stdout and stderr to files in trial directories. If this is False (default), no files are written. If true, outputs are written to trialdir/stdout and trialdir/stderr, respectively. If this is a single string, this is interpreted as a file relative to the trialdir, to which both streams are written. If this is a Sequence (e.g. a Tuple), it has to have length 2 and the elements indicate the files to which stdout and stderr are written, respectively.

Methods

Attributes

callbacks

checkpoint_config

failure_config

local_dir

log_to_file

name

progress_reporter

stop

storage_filesystem

storage_path

sync_config

verbose