ray.air.Result
ray.air.Result#
- class ray.air.Result(metrics: Optional[Dict[str, Any]], checkpoint: Optional[ray.air.checkpoint.Checkpoint], error: Optional[Exception], log_dir: Optional[pathlib.Path], metrics_dataframe: Optional[pd.DataFrame], best_checkpoints: Optional[List[Tuple[ray.air.checkpoint.Checkpoint, Dict[str, Any]]]])[source]#
Bases:
object
The final result of a ML training run or a Tune trial.
This is the class produced by Trainer.fit(). It contains a checkpoint, which can be used for resuming training and for creating a Predictor object. It also contains a metrics object describing training metrics.
error
is included so that non successful runs and trials can be represented as well.The constructor is a private API.
- metrics#
The final metrics as reported by an Trainable.
- Type
Optional[Dict[str, Any]]
- checkpoint#
The final checkpoint of the Trainable.
- Type
Optional[ray.air.checkpoint.Checkpoint]
- error#
The execution error of the Trainable run, if the trial finishes in error.
- Type
Optional[Exception]
- log_dir#
Directory where the trial logs are saved.
- Type
Optional[pathlib.Path]
- metrics_dataframe#
The full result dataframe of the Trainable. The dataframe is indexed by iterations and contains reported metrics.
- Type
Optional[pd.DataFrame]
- best_checkpoints#
A list of tuples of the best checkpoints saved by the Trainable and their associated metrics. The number of saved checkpoints is determined by the
checkpoint_config
argument ofrun_config
(by default, all checkpoints will be saved).- Type
Optional[List[Tuple[ray.air.checkpoint.Checkpoint, Dict[str, Any]]]]
PublicAPI (beta): This API is in beta and may change before becoming stable.
- property config: Optional[Dict[str, Any]]#
The config associated with the result.