unilab.training.experiment.patch_rsl_rl_resume_state

unilab.training.experiment.patch_rsl_rl_resume_state()[source]

Persist + restore Logger.tot_time / tot_timesteps across resume.

Without this patch, rsl-rl’s Logger.__init__ writes tot_time = 0 and tot_timesteps = 0 and OnPolicyRunner.load never refreshes them, so the Train/mean_reward/time and Train/mean_episode_length/time TensorBoard scalars (which use int(self.tot_time) as their step) restart from 0 on every resumed run and visually overlap the original segment. See issue #441.

The patch wraps OnPolicyRunner.save / OnPolicyRunner.load to round-trip a unilab_logger_state key in the saved dict. Legacy checkpoints (without the key) load unchanged.

Return type:

None