Repository navigation
test(writer): drive module-replacement saves with a real CheckpointSession - #6524
Merged
Merged
Conversation
…ssion (#6523) save_quantized_embeddings needs a source with root/weight_map since #6473 (requantize records a CheckpointSession). The tests still passed a LazyTurtle-shaped SimpleNamespace, so six nodes raised 'Module replacement save requires a checkpoint source'. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Fixes #6523
What was wrong
tests/test_writer_dynamic_order.pypassedSimpleNamespace(model_local_path=..., _weight_map=..., _index_filename=...)(the removed LazyTurtle shape) as_module_replacement_source. Since #6473 the writer needsroot/weight_map/index_filename, whichrequantize()provides with aCheckpointSession. Test-only change.Change
Both fixtures now build
CheckpointSession(str(source))from the files the test wrote; the indexed variant also asserts the session picked up the index (index_filename), so the indexed branch of the writer is really exercised.Evidence
mainc649fcb:pytest tests/test_writer_dynamic_order.pyValueError: Module replacement save requires a checkpoint source.), 5 passedtests/test_requant_embed_lm_head_e2e.py(requantize + save + reload + generate, RTX 4090)uvx [email protected] check tests/test_writer_dynamic_order.pyNot touched:
tests/test_module_replacement_generation_config_5387.pyalready usesroot/weight_map;tests/test_norm_requant.py:310builds a similar double outside this sweep shard.🤖 Generated with Claude Code