Runner Lifecycle¶
Runner code owns training lifecycle. Scripts compose Hydra config and start the right runner; they should not create a second collector/learner protocol.
Runtime-Specific Owners¶
src/unilab/scripts/train_rsl_rl.pyusesunilab.rl.RslRlVecEnvAdapterand RSL-RL’sOnPolicyRunner.src/unilab/scripts/train_appo.pyusesAPPORunner,TensorRolloutRingBuffer, andSharedWeightSync.src/unilab/scripts/train_sac.pyandsrc/unilab/scripts/train_flashsac.pyuse off-policy runners withReplayBufferandSharedWeightSync.AsyncRunnerowns collector process lifecycle and shared-resource cleanup for async runners.
Rules¶
Do not bypass
AsyncRunner.close()semantics for async collectors.Do not patch env observation or critic semantics inside runner code; preserve the
obsplus optionalcriticcontract.Use
src/unilab/training/run.pyfor shared log-root, checkpoint, and playback resolution helpers instead of copying those rules into scripts.
Evidence In Repo¶
Shared training helpers:
src/unilab/training/common.py,src/unilab/training/run.pyAsync lifecycle:
unilab.rl.runtime.async_runnerRunner tests:
tests/algos/test_appo_runner.py,tests/algos/test_offpolicy_double_buffer_runner.py,tests/rl/runtime/test_async_runner.py