The issue is that, although you expect best_result.checkpoint to return a valid checkpoint, it is always None. This typically happens if your training function does not report checkpoints to Ray Tune using the correct API, or if checkpointing is not properly configured in your Tuner or Trainer setup. According to the TuneReportCallback documentation, you must ensure that checkpoints are reported to Tune, either by using the TuneReportCallback (for Ray Train) or by calling tune.report(…, checkpoint=…) in your training loop.
If you do not explicitly report checkpoints, Tune will not register them, and best_result.checkpoint will be None. Make sure your training code or Trainer is configured to save and report checkpoints, and that your Tuner’s run_config includes a CheckpointConfig with checkpointing enabled (e.g., checkpoint_at_end=True or checkpoint_frequency > 0). See this example for how to report checkpoints in a custom training function.
Would you like a step-by-step example of how to ensure checkpoints are properly reported and accessible?