Files
SkillFactory/performance_v042/sensor-epoch-code-review.md
T
chenlin c528dd268f feat: checkpoint Go2 FL simulation performance v0.4.2
Include callable skill and live-GUI prerequisites, epoch sensor reads, packed snapshots, sampled bit-exact kinematics, and verified-tick rendering without changing the physical/control schedule.

Record bounded analytic S1 GUI/headless qualification, original failures and CPU evidence (1557 passed, 6 skipped). Preserve accepted_skill=false and sub-real-time limitations. Exclude native authorities, caches, large media and local delivery copies; retain sealed artifact digest.
2026-10-16 15:46:01 +08:00

2.7 KiB
Raw Blame History

Review

Paths below use T = source/SkillFactory/SkillFactory/tasks/manager_based/contact_cycle_sim/.

  • Correct — epoch freshness: T/sensor_epoch_v042.py:26–48 caches only successful getters, returns the same live object, and invalidates before and after every delegated update/reset—including zero-dt calls and exceptions.
  • Correct — installation/reset safety: installation replaces scene dictionary entries without modifying original sensor methods (sensor_epoch_v042.py:51–66). Constructor-installed source reset guards remain effective (T/evaluation_env.py:316–326). Integration installs after construction and before the initial reset (scripts/evaluate_cycle_functional_flow.py:223–248).
  • Correct — fail-before-next-step: each physics step is followed by scene update, latch/state updates, safety and synchronous evidence; failures return before rendering or another step (T/evaluation_env.py:457–471). The proxy introduces no deferred work.
  • Correct — SDK premise: inspected installed SensorBase._update_outdated_buffers and PhysX ContactSensor._update_buffers_impl: repeated getters invoke native fetches even when downstream kernels skip false-mask entries. Those kernels preserve already-captured values when masked out.
  • Correct — implementation selection/provenance: sensor_epoch selects the original recorder (T/performance_v042.py:34–44). Both new modules are preloaded, source-bound and included in authority inputs (scripts/evaluate_cycle_functional_flow.py:58–60, scripts/skill_launch_v4.py:17–29, source/SkillFactory/SkillFactory/legs/contact_cycle_sim/skill_binding_v4.py:8–16,44–49).
  • Fixed: None; read-only review.

No issues found.

Merge verdict: OK with notes for the first bounded sensor_epoch qualification run—not final performance or native-equivalence acceptance.

Validation and residual risks

  • Inspected tests/test_contact_cycle_performance_v042.py; supplied performance_v042/cpu-second.log and XML report 44 passed. No tests, commands, Kit/GPU operations or edits were performed during this review.
  • Native trace/gate equivalence, constructor/reset behavior under Kit, and speedup remain unqualified until the optimized run.
  • This is not a general transparent sensor replacement: attribute writes are not forwarded, and previously captured source references bypass the proxy. Current inspected consumers do not introduce conflicting sensor mutations. In particular, LoadedState.sensor retains the original mount sensor (tasks/manager_based/loaded_leg/mdp.py:18,70–72); epoch counters therefore describe wrapper traffic, not all sensor reads.
  • Frozen-file hashes and stopped-process/protected-artifact claims were not independently recomputed.