ray.tune.ExperimentAnalysis.get_best_checkpoint
ray.tune.ExperimentAnalysis.get_best_checkpoint#
- ExperimentAnalysis.get_best_checkpoint(trial: ray.tune.experiment.trial.Trial, metric: Optional[str] = None, mode: Optional[str] = None) Optional[ray.train.Checkpoint][source]#
Gets best persistent checkpoint path of provided trial.
Any checkpoints with an associated metric value of
nanwill 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
Checkpointobject