Skip to content

test(norm): pass a CheckpointSource to the module-replacement writer (#6545) - #6546

Merged
Qubitium merged 1 commit into
mainfrom
test/norm-requant-checkpoint-source
Dec 1, 2026
Merged

Qubitium merged 1 commit into
mainfrom
test/norm-requant-checkpoint-source

Conversation

@Qubitium

@Qubitium Qubitium commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #6545

#6473 made _save_module_replacement_safetensors read the source checkpoint through a CheckpointSource (root, weight_map). test_packed_rmsnorm_tuning_save_reload_preserves_quantized_tensors still passed the pre-#6473 SimpleNamespace(model_local_path, _weight_map) and hit ValueError: Module replacement save requires a checkpoint source. The public caller (save_quantized_embeddings) already passes a real checkpoint_source.

What Changed

  • The test builds the source with CheckpointSource.from_checkpoint(model_local_path=..., config=None). Its assertions are unchanged: tuned norm differs, packed proj.* tensors are bit-identical, reload round trip.
  • No product code change.

Tests

  • Executed and passed.
  • Not applicable (new test): updates a stale fixture; the test itself is the regression.
# RED: origin/main c649fcb5f
pytest -q tests/test_norm_requant.py
1 failed, 18 passed   # ValueError: Module replacement save requires a checkpoint source.
# GREEN: this branch
pytest -q tests/test_norm_requant.py
19 passed

Lint: uvx [email protected] check ... tests ...: All checks passed. Environment: torch 2.15.0+cu132, Python 3.14, CPU.

Measured Impact

Not applicable (tests only).

Model Support / Module Plan

Not applicable.

AWQ onboarding safety

Not applicable.

Logic Flow Documentation

Not applicable.

Review Requirements

  • Reviewed; minimal surface; no monkeypatching added.

Kernel Accuracy Requirements

Not applicable.

Notes

Found by the release-readiness sweep on origin/main c649fcb.

🤖 Generated with Claude Code

…6545)

#6473 moved _save_module_replacement_safetensors onto CheckpointSource
(root, weight_map); the test still built the old turtle namespace.

Fixes #6545

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Qubitium
Qubitium marked this pull request as ready for review December 1, 2026 02:45
@Qubitium
Qubitium merged commit 4f6466a into main Dec 1, 2026
6 checks passed
@Qubitium
Qubitium deleted the test/norm-requant-checkpoint-source branch December 1, 2026 02:45
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] norm_requant save/reload test still passes the pre-#6473 turtle shape to the module-replacement writer

1 participant