Skip to content

Commit 87e6bdd

Browse files
Merge pull request #4443 from AI-Hypercomputer:fix/scan-layers-mismatch-test-message
PiperOrigin-RevId: 949321182
2 parents c27d930 + 9c1cc42 commit 87e6bdd

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/integration/checkpointing_test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,9 @@ def get_cmd(steps, metrics_file):
228228
with pytest.raises(ValueError) as excinfo:
229229
train_main(mismatch_command)
230230

231-
assert "Configuration mismatch" in str(excinfo.value) or "Failed to restore checkpoint" in str(excinfo.value)
232-
assert "scan_layers" in str(excinfo.value)
231+
# The scanned checkpoint doesn't carry the unscanned model's per-layer weights, so the restore
232+
# reports them as missing rather than leaving them at their init values.
233+
message = str(excinfo.value)
234+
assert "Checkpoint does not match the model" in message
235+
assert "decoder/layers/0/" in message
236+
assert "scan_layers" in message

0 commit comments

Comments
 (0)