ray.tune.ExperimentAnalysis.get_last_checkpoint#

ExperimentAnalysis.get_last_checkpoint(trial=None, metric='training_iteration', mode='max') Checkpoint | None[source]#

Gets the last checkpoint of the provided trial, i.e., with the highest “training_iteration”.

If no trial is specified, it loads the best trial according to the provided metric and mode (defaults to max. training iteration).

Parameters:
  • trial – If None, load the best trial automatically.

  • metric – If no trial is specified, use this metric to identify the best trial and load the last checkpoint from this trial.

  • mode – If no trial is specified, use the metric and this mode to identify the best trial and load the last checkpoint from it.

Returns:

Path for last checkpoint of trial