Summary
Migrate the SONIC-specific FastSAC integration to the neutral PolicyVariant contract, while preserving the generic FastSAC core.
Baseline:
Goals
- Add the neutral
PolicyVariant contract and registry in motrix_rl/fastsac/api.py.
- Register
default and sonic; SONIC registration happens only through the documented side-effect import in motrix_rl/fastsac/__init__.py.
- Replace
algo.sonic with algo.policy_variant plus the opaque algo.variant mapping.
- Remove FastSAC-core
sonic_cfg branches and SONIC imports.
- Checkpoints save
policy_variant and self-describing policy_variant_metadata; export rebuilds actors from that metadata.
- Remove profile-specific SONIC environments and retain only
g1-sonic, using one task recipe and one canonical PolicyVariant config with 10 future frames.
- Keep compact observation reconstruction, GPU-env async D2H staging, deployment format changes, and external official SONIC release-loader behavior out of scope.
Compatibility
- Existing default FastSAC checkpoints without variant metadata remain exportable.
- Checkpoints from the pre-merge SONIC branch using
"sonic": {"enabled": ...} are not supported and should fail with a clear message.
g1-sonic-lafan and g1-sonic-smoke registrations and task recipes are removed in favor of the single g1-sonic environment.
Acceptance
- Targeted tests covering policy variants, SONIC actor/aux semantics, collector, learner, ONNX export, async workers, release loading, and SONIC environment/motion/manager contracts.
- Full pytest suite, pre-commit hooks, and whitespace checks.
- Documentation updated bilingually and generated environment overview checked.
- Static scans confirm no SONIC imports or branches in generic FastSAC modules and no obsolete environment/profile config references.
Summary
Migrate the SONIC-specific FastSAC integration to the neutral
PolicyVariantcontract, while preserving the generic FastSAC core.Baseline:
origin/main.sonicbranch is based on perf(fastsac): async collector push 的拷贝冗余与同步阻塞 #63 and adds the SONIC G1 workflow.next_obs,ring_capacity >= 2, and learner/collector CPU affinity.Goals
PolicyVariantcontract and registry inmotrix_rl/fastsac/api.py.defaultandsonic; SONIC registration happens only through the documented side-effect import inmotrix_rl/fastsac/__init__.py.algo.sonicwithalgo.policy_variantplus the opaquealgo.variantmapping.sonic_cfgbranches and SONIC imports.policy_variantand self-describingpolicy_variant_metadata; export rebuilds actors from that metadata.g1-sonic, using one task recipe and one canonical PolicyVariant config with 10 future frames.Compatibility
"sonic": {"enabled": ...}are not supported and should fail with a clear message.g1-sonic-lafanandg1-sonic-smokeregistrations and task recipes are removed in favor of the singleg1-sonicenvironment.Acceptance