Selecting best checkpoint to keep training in tune

O.S.Tov asked this question on the Slack channel.

Please do not use the Slack channel anymore for questions on RLlib! All discussions should be moved here for better searchability and documentation of issues and questions. Thank you.

Hi, I’ve been training a PPO agent in a jupyter notebook using analysis =, I’ve added a checkpoint_freq=10 and checkpoint_at_end=True as arguments. I want to load the best agent without using the ‘analysis’ object since this one is only available at the current python session (using the .get_best_trial).I’ve tried to instantiate a new ExperimentAnalysis object by providing the path to the .json file representing that specific run but I cannot use .best_get_trial the same wayThere seems to be a bit of confusion about the whole saving/loading agents procedure, if someone could please clarify the process I think it would be very helpful to the communityThanks

analysis =
name='PPO_run_1') checkpoints = analysis.get_trial_checkpoints_paths(
trial=analysis.get_best_trial('episode_reward_mean', mode='max'),
metric='episode_reward_mean') checkpoint_path = checkpoints[0][0] agent = PPOTrainer(config=config, env='TradingEnv')

This is the code I’ve been using so far, if for some reason the python session isn’t available, the “analysis” object cannot be used anymore.