Skip to content

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

Done

Description

@Qubitium

Summary

On main (c649fcb) six nodes fail:

FAILED tests/test_writer_dynamic_order.py::test_dynamic_rule_order_survives_save[{dynamic0,dynamic1,dynamic2,None}-True]
FAILED tests/test_writer_dynamic_order.py::test_repeated_module_replacement_save_drops_prior_layout[False|True]
  gptqmodel/models/writer.py:2533: ValueError: Module replacement save requires a checkpoint source.

Cause: stale test double

Since #6473, requantize() records the loaded checkpoint as a gptqmodel.weight_loader.session.CheckpointSession, and save_quantized_embeddings requires a source with root / weight_map (and optional index_filename). These tests still hand the writer a SimpleNamespace(model_local_path=..., _weight_map=..., _index_filename=...) shaped like the removed LazyTurtle, so the writer rightly rejects it. #6499 fixed three similar tests; this file was missed.

The product path is fine: the real requantize(...) + save_quantized_embeddings round trip passes in tests/test_requant_embed_lm_head_e2e.py.

Fix

Use a real CheckpointSession(str(source)) (single-file and indexed). PR to follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions