ray.train.Result#

class ray.train.Result(metrics: Dict[str, Any] | None, checkpoint: Optional[ForwardRef('ray.train.Checkpoint')], error: ray.train.v2.api.exceptions.TrainingFailedError | None, path: str, metrics_dataframe: Optional[ForwardRef('pd.DataFrame')] = None, best_checkpoints: Optional[List[Tuple[ForwardRef('ray.train.Checkpoint'), Dict[str, Any]]]] = None, _storage_filesystem: pyarrow.fs.FileSystem | None = None)#

Bases: Result

property config: Dict[str, Any] | None#

Warning

DEPRECATED: This API is deprecated and may be removed in future Ray releases.

classmethod from_path(path: str | PathLike, storage_filesystem: pyarrow.fs.FileSystem | None = None) Result[source]#

Restore a Result object from local or remote trial directory.

Parameters:
  • path – A path of a trial directory on local or remote storage (ex: s3://bucket/path or /tmp/ray_results).

  • storage_filesystem – A custom filesystem to use. If not provided, this will be auto-resolved by pyarrow. If provided, the path is assumed to be prefix-stripped already, and must be a valid path on the filesystem.

Returns:

A Result object of that trial.

get_best_checkpoint(metric: str, mode: str) Checkpoint | None[source]#

PublicAPI (alpha): This API is in alpha and may change before becoming stable.