MCPcopy
hub / github.com/ray-project/ray / RunConfig

Class RunConfig

python/ray/train/v2/api/config.py:395–511  ·  view source on GitHub ↗

Runtime configuration for training runs. Args: name: Name of the trial or experiment. If not provided, will be deduced from the Trainable. storage_path: Path where all results and checkpoints are persisted. Can be a local directory or a destination on clo

Source from the content-addressed store, hash-verified

393@dataclass
394@PublicAPI(stability="stable")
395class RunConfig:
396 """Runtime configuration for training runs.
397
398 Args:
399 name: Name of the trial or experiment. If not provided, will be deduced
400 from the Trainable.
401 storage_path: Path where all results and checkpoints are persisted.
402 Can be a local directory or a destination on cloud storage.
403 For multi-node training/tuning runs, this must be set to a
404 shared storage location (e.g., S3, NFS).
405 This defaults to the local ``~/ray_results`` directory.
406 storage_filesystem: A custom filesystem to use for storage.
407 If this is provided, `storage_path` should be a path with its
408 prefix stripped (e.g., `s3://bucket/path` -> `bucket/path`).
409 failure_config: Failure mode configuration.
410 checkpoint_config: Checkpointing configuration.
411 callbacks: [DeveloperAPI] A list of callbacks that the Ray Train controller
412 will invoke during training.
413 worker_runtime_env: [DeveloperAPI] Runtime environment configuration
414 for all Ray Train worker actors.
415 logging_config: Configuration for Ray Train's logging behavior.
416 See :class:`LoggingConfig` for details.
417 """
418
419 name: Optional[str] = None
420 storage_path: Optional[str] = None
421 storage_filesystem: Optional[pyarrow.fs.FileSystem] = None
422 failure_config: Optional[FailureConfig] = None
423 checkpoint_config: Optional[CheckpointConfig] = None
424 callbacks: Optional[List["UserCallback"]] = None
425 worker_runtime_env: Optional[Union[dict, RuntimeEnv]] = None
426 logging_config: Optional[LoggingConfig] = None
427
428 sync_config: str = _DEPRECATED
429 verbose: str = _DEPRECATED
430 stop: str = _DEPRECATED
431 progress_reporter: str = _DEPRECATED
432 log_to_file: str = _DEPRECATED
433
434 def __post_init__(self):
435 from ray.train.constants import DEFAULT_STORAGE_PATH
436
437 if self.storage_path is None:
438 self.storage_path = DEFAULT_STORAGE_PATH
439
440 if not self.failure_config:
441 self.failure_config = FailureConfig()
442
443 if not self.checkpoint_config:
444 self.checkpoint_config = CheckpointConfig()
445
446 if not self.logging_config:
447 self.logging_config = LoggingConfig()
448
449 if isinstance(self.storage_path, Path):
450 self.storage_path = self.storage_path.as_posix()
451
452 run_config_deprecation_message = (

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…