test: stabilize benchmark timing contract - #869
Merged
TATP-233 merged 2 commits intoAug 2, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #705
Addresses #855
Real CI Root Cause
GitHub Actions run 30738994557 passed Ruff, mypy, pyright, benchmark smoke, and shards A/B/C/D/F/H. Shard E failed at:
tests/benchmark/test_g1_motion_tracking_numba_benchmark.py::test_g1_motion_tracking_numba_benchmark_builds_records_and_matches_numpyThe test compared
numpy_total_ms >= numpy_reward_termination_ms, but those values are produced by separatetime_callinvocations. On the shared runner, the one-sample reward/termination timing was 1.647 ms while the independently measured full update-state timing was 1.107 ms. That ordering is not a stable wall-clock contract and does not indicate incorrect benchmark output.The implementation defines
numpy_total_ms = numpy_update_state_meanandnumba_total_ms = numba_update_state_mean. The revised test checks those exact definitions and keeps parity, positive timings, record identity, thread, and speedup assertions intact.Validation
119 passed, 1 skipped, 5 deselected1 passedLD_LIBRARY_PATH=/tmp/unilab-nvml-570.133.07/usr/lib/x86_64-linux-gnu make test-all: 2350 passed, 26 skipped, 449 deselected, 1 xfailed; coverage 68%; Ruff, mypy, pyright, and benchmark smoke passed51fc5014222306dee30a48ddbe2c19b7a1fafe8f6f3a8576f60efa77a3191d50cd10c78aa4adbfb3d31ebe8cbfbc91e561bcd5deok=true,errors=[], promotion required and satisfiedgit diff --checkpassed; worktree cleanImpact
ppo_torch + g1_walk_flat + mjwarp + device_residentIntegration
This child PR intentionally targets
feat/issue-705-manager-mjwarp. Per #705, final PR #847 remains open for realmain-targeted CI and user review; this PR does not approve or merge #847.