ray.tune.ExperimentAnalysis.get_best_checkpoint#
- ExperimentAnalysis.get_best_checkpoint(trial: Trial, metric: str | None = None, mode: str | None = None) Checkpoint | None [source]#
Gets best persistent checkpoint path of provided trial.
Any checkpoints with an associated metric value of
nan
will be filtered out.- Parameters:
trial – The log directory of a trial, or a trial instance.
metric – key of trial info to return, e.g. “mean_accuracy”. “training_iteration” is used by default if no value was passed to
self.default_metric
.mode – One of [min, max]. Defaults to
self.default_mode
.
- Returns:
A
Checkpoint
object