unilab.training.experiment.patch_rsl_rl_resume_state¶
- unilab.training.experiment.patch_rsl_rl_resume_state()[source]¶
Persist + restore
Logger.tot_time/tot_timestepsacross resume.Without this patch, rsl-rl’s
Logger.__init__writestot_time = 0andtot_timesteps = 0andOnPolicyRunner.loadnever refreshes them, so theTrain/mean_reward/timeandTrain/mean_episode_length/timeTensorBoard scalars (which useint(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.loadto round-trip aunilab_logger_statekey in the saved dict. Legacy checkpoints (without the key) load unchanged.- Return type: