Repository navigation
fix(tests): run checkpoint and MoE suites in fresh checkouts - #3572
Merged
Merged
Conversation
Qubitium
marked this pull request as ready for review
November 8, 2026 01:28
Qubitium
pushed a commit
that referenced
this pull request
Nov 12, 2026
All but one test in this file fail on main. Two changes since the file was last touched (#3572) moved the ground it stands on. The mocked processor auto-creates attributes, so the capture-frontier restore hook added in #3600 looks callable and returns a truthy mock, which makes `_run_single_subset_pass` skip the forward pass every assertion is about. A real processor without that hook returns None, so the fixture now says so explicitly. #3600 also added a causal replay pass: with `execution_config.fwd_replay_after_process` set, each chunk runs one capture forward and one replay forward, so `_run_forward_batches` is called twice per chunk instead of once. The expectations were doubled and the comments now say why, instead of just carrying a different number. The flush counts are unchanged: the replay pass does not call `torch_empty_cache`. tests/test_moe_expert_batching.py 9 passed Before this change the file reported 8 failed, 1 passed on main.
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.
Problem
The recent checkpoint and MoE suites do not run reliably in a fresh checkout:
test_checkpoint_quantization.pylaunches its driver fromtests/, so the child cannot import the localgptqmodelpackage unless it is installed orPYTHONPATHis set externally. In a fresh worktree, all 28 subprocess recovery cases failed at import before testing recovery.test_moe_expert_batching.pyleavesend_shared_input_capture()as aMagicMock. The telemetry consumer compares itsexpected_followersfield with an integer, so eight batching cases fail before their assertions.Fix
Prepend this checkout to the checkpoint driver's
PYTHONPATHwhile retaining the caller's path. Set the MoE capture mocks to the empty/no-telemetry values matching these fixtures.Validation
tests/test_moe_expert_batching.py tests/test_moe_bypass_batch_size.py: 30 passed.uvx ruff check tests/test_checkpoint_quantization.py tests/test_moe_expert_batching.py: passed.git diff --check: passed.This PR changes test fixtures only.