ray.tune.ExperimentAnalysis#
- class ray.tune.ExperimentAnalysis(experiment_checkpoint_path: str | PathLike, *, storage_filesystem: pyarrow.fs.FileSystem | None = None, trials: List[Trial] | None = None, default_metric: str | None = None, default_mode: str | None = None)[source]#
Analyze results from a Ray Train/Tune experiment.
To use this class, the run must store the history of reported metrics in log files (e.g.,
result.json
andprogress.csv
). This is the default behavior, unless default loggers are explicitly excluded with theTUNE_DISABLE_AUTO_CALLBACK_LOGGERS=1
environment variable.- Parameters:
experiment_checkpoint_path – Path to an
experiment_state.json
file, or a directory that contains anexperiment_state.json
file.default_metric – Default metric for comparing results. Can be overwritten with the
metric
parameter in the respective functions.default_mode – Default mode for comparing results. Has to be one of [min, max]. Can be overwritten with the
mode
parameter in the respective functions.trials – List of trials that can be accessed via
analysis.trials
.
PublicAPI (beta): This API is in beta and may change before becoming stable.
Methods
Returns a pandas.DataFrame object constructed from the trials.
Returns all trial hyperparameter configurations.
Gets best persistent checkpoint path of provided trial.
Retrieve the best config corresponding to the trial.
Retrieve the best trial object.
Gets the last checkpoint of the provided trial, i.e., with the highest "training_iteration".
Attributes
Get the checkpoint path of the best trial of the experiment
Get the config of the best trial of the experiment
Get the full result dataframe of the best trial of the experiment
Get the last result of the best trial of the experiment
Get the best result of the experiment as a pandas dataframe.
Get the best trial of the experiment
Path pointing to the experiment directory on persistent storage.
Get the last result of the all trials of the experiment
Get all the last results as a pandas dataframe.
List of all dataframes of the trials.