unilab.training.experiment¶
Shared experiment tracking utilities for local files and W&B.
Functions
|
|
|
|
|
|
Patch rsl-rl W&B writer so it can reuse an already-open run. |
Classes
Tracks experiment metadata locally and optionally in Weights & Biases. |
- unilab.training.experiment.build_wandb_settings(training_cfg, *, algo_name, task_name, sim_backend, log_dir)[source]¶
- class unilab.training.experiment.ExperimentTracker[source]¶
Bases:
objectTracks experiment metadata locally and optionally in Weights & Biases.
- Parameters:
- __init__(*, root_dir, log_dir, algo_name, task_name, sim_backend, training_cfg, full_cfg, device=None, collector_device=None, seed_info=None)[source]¶
- unilab.training.experiment.patch_rsl_rl_wandb_writer()[source]¶
Patch rsl-rl W&B writer so it can reuse an already-open run.
- Return type:
- 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: