Skip to content

test(writer): drive module-replacement saves with a real CheckpointSession - #6524

Merged
Qubitium merged 1 commit into
mainfrom
test/writer-dynamic-order-checkpoint-session
Dec 1, 2026
Merged

Qubitium merged 1 commit into
mainfrom
test/writer-dynamic-order-checkpoint-session

Conversation

@Qubitium

@Qubitium Qubitium commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Fixes #6523

What was wrong

tests/test_writer_dynamic_order.py passed SimpleNamespace(model_local_path=..., _weight_map=..., _index_filename=...) (the removed LazyTurtle shape) as _module_replacement_source. Since #6473 the writer needs root / weight_map / index_filename, which requantize() provides with a CheckpointSession. 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

Check Result
main c649fcb: pytest tests/test_writer_dynamic_order.py 6 failed (ValueError: Module replacement save requires a checkpoint source.), 5 passed
This branch 11 passed
Real path: tests/test_requant_embed_lm_head_e2e.py (requantize + save + reload + generate, RTX 4090) passed (with the Evalution fix from #6511)
uvx [email protected] check tests/test_writer_dynamic_order.py pass

Not touched: tests/test_module_replacement_generation_config_5387.py already uses root/weight_map; tests/test_norm_requant.py:310 builds a similar double outside this sweep shard.

🤖 Generated with Claude Code

…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]>
@Qubitium
Qubitium marked this pull request as ready for review December 1, 2026 02:40
@Qubitium
Qubitium merged commit d230e27 into main Dec 1, 2026
6 checks passed
@Qubitium
Qubitium deleted the test/writer-dynamic-order-checkpoint-session branch December 1, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_writer_dynamic_order: module-replacement saves fail on main (LazyTurtle-style source double)

1 participant