unilab.training.run¶
Run directory and checkpoint resolution helpers.
Functions
|
Resolve the composed |
|
Attach a |
|
Return the canonical run directory name shared by all training entries. |
|
Build the user-facing diagnostic for an unresolvable play checkpoint. |
|
Resolve the algorithm log root. |
|
Return whether the configured mode selects the browser-based viser viewer. |
|
Keep independent post-training play artifacts (ONNX export, video render) from blocking each other: log the failure and continue with the rest. |
|
Resolve a checkpoint path from Hydra config and repository root. |
|
Build the shared tensor diagnostics config, or |
|
Resolve one canonical run directory shared by all distributed ranks. |
|
Return whether train/eval should enter playback for the configured mode. |
- unilab.training.run.build_run_dir_name(timestamp, sim_backend, *, world_size=1)[source]¶
Return the canonical run directory name shared by all training entries.
- unilab.training.run.algo_config_dict(cfg)[source]¶
Resolve the composed
cfg.algosubtree into a plain mutable dict.
- unilab.training.run.format_play_checkpoint_error(cfg, *, task_log_root, load_path, load_path_dir)[source]¶
Build the user-facing diagnostic for an unresolvable play checkpoint.
- unilab.training.run.resolve_nan_guard_cfg(training_cfg)[source]¶
Build the shared tensor diagnostics config, or
None.- Parameters:
training_cfg (
Any)- Return type:
- unilab.training.run.apply_env_nan_guard(env, training_cfg)[source]¶
Attach a
NanGuardtoenvwhen diagnostics are enabled.
- unilab.training.run.is_viser_play_render_mode(play_render_mode)[source]¶
Return whether the configured mode selects the browser-based viser viewer.
viseris a UniLab-level playback mode layered on top of the unisimPLAY_RENDER_MODEScontract; it renders through the shared MuJoCo playback shell instead of a backend-native renderer, so it never reachesSimBackend.resolve_play_render_plan.
- unilab.training.run.should_run_playback(*, play_only, no_play, play_render_mode)[source]¶
Return whether train/eval should enter playback for the configured mode.
- unilab.training.run.nonfatal_play_step(step)[source]¶
Keep independent post-training play artifacts (ONNX export, video render) from blocking each other: log the failure and continue with the rest.
- unilab.training.run.get_log_root(root_dir, cfg=None, *, algo_log_name=None, log_root=None)[source]¶
Resolve the algorithm log root.
The configured
training.log_root(or the explicitlog_rootargument) wins; otherwise theUNILAB_TEST_LOG_ROOToverride applies; otherwise the default is<root_dir>/logs/<algo_log_name>. Pass either a composed Hydracfgor an explicitalgo_log_name.
- unilab.training.run.resolve_run_log_dir(cfg, *, world_size=1, timestamp=None, root_dir=None)[source]¶
Resolve one canonical run directory shared by all distributed ranks.