Layer Boundaries¶
This page is the English checklist for the architecture rule recorded in ADR-0001 Runtime Model And Layer Boundaries. The canonical project standard is Developer 指南.
Owner Layers¶
Layer |
Owner paths |
Owns |
|---|---|---|
L0 Backend |
|
Physics backend abstraction, backend-owned scene materialization, backend capabilities. |
L1 Env |
|
MDP semantics, observations, rewards, reset logic, backend-to-task adaptation. |
L2 Config and Registry |
|
Hydra composition, owner YAML identity, env/reward registration. |
L3 Algo and IPC |
|
Learners, runners, collectors, replay and rollout buffers, weight sync. |
L4 Scripts |
|
Entrypoint assembly only. |
Rules¶
Fix behavior at the owner layer. A training script should not carry long-term env, backend, reward, or algorithm business rules.
Env code may depend on the declared
SimBackendcontract insrc/unilab/base/backend/base.py; if shared env logic needs a new backend capability, add it toSimBackendbefore using it.Config choices should stay in Hydra owner YAMLs under
conf/, not in Python-side backend switches.Asset, XML, and model metadata work belongs on init, materialization, or cache paths. Do not move asset parsing into
step(),reset(), or runtime domain randomization loops.
Evidence In Repo¶
Architecture contract: ADR-0001 Runtime Model And Layer Boundaries
Backend boundary:
src/unilab/base/backend/base.pyEnv state contract:
src/unilab/base/np_env.pyRegistry construction path:
src/unilab/base/registry.pyTraining entrypoints:
scripts/train_rsl_rl.py,scripts/train_mlx_ppo.py,scripts/train_appo.py,scripts/train_offpolicy.py