Skip to content

[TEST] #4926 (fix of #4923) incomplete: two more loader doubles lack require_load_tokenizer; test_gguf_load_policy_env_removal and test_lazy_turtle_conversion_cache red on main #4941

Description

@Qubitium

Found on main @ 3867c82, RTX 4090 (tests are CPU-only).

What is wrong

#4894 (#4755) made ModelLoader read cls.require_load_tokenizer (gptqmodel/models/loader.py:2070 and :2710). #4926 (fix of #4923) declared the attribute only on the nine DummyQModel doubles in tests/test_local_model_paths.py. Two more loader tests build plain-class doubles that do not subclass BaseQModel, and they are still red on main for the same reason:

  • tests/test_gguf_load_policy_env_removal.py:321: DummyQModel
  • tests/test_lazy_turtle_conversion_cache.py:238: _DummyQModel
$ pytest -q tests/test_gguf_load_policy_env_removal.py tests/test_lazy_turtle_conversion_cache.py
FAILED tests/test_gguf_load_policy_env_removal.py::test_public_load_uses_the_kernel_policy_to_choose_the_gguf_parser
E       AttributeError: type object 'DummyQModel' has no attribute 'require_load_tokenizer'
gptqmodel/models/loader.py:2070: AttributeError
FAILED tests/test_lazy_turtle_conversion_cache.py::test_loader_converts_bin_under_configured_offload_path_not_tmpdir
E       AttributeError: type object '_DummyQModel' has no attribute 'require_load_tokenizer'

I checked every other ModelLoader double (test_rocm_exl3_auto, test_moe_reload_meta_4400, test_backend_config_reuse_4446, test_loader_offload_staging_4385, test_kernel_config, test_phimoe_moe_routing_4636, test_stage_modules): they all pass.

Suggested fix

Add require_load_tokenizer = True to both doubles. Alternatively, read the flag with getattr(cls, "require_load_tokenizer", True) in the loader so that plain-class doubles keep working. (Adding the attribute is the smaller change and keeps the contract explicit.)

Test that should have caught it

The #4926 sweep should have grepped all of tests/ for ModelLoader doubles, not just one file.

Severity: low (test-only). The GGUF parser-selection guard and the .bin conversion offload-path guard are not running on main.

🤖 Generated with Claude Code

Activity

  1. Qubitium commented on Nov 17, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim: agent-root-4941 is working on this issue now.

  2. Qubitium commented on Nov 17, 2026

    @Qubitium
    CollaboratorAuthor

    Agent claim released: agent-53ba17eb4d83 finished this issue.

    Pull request: #4957

    Declare require_load_tokenizer on the two remaining loader doubles (test_gguf_load_policy_env_removal, test_lazy_turtle_conversion_cache) and verify both files are green.

  3. Qubitium commented on Nov 17, 2026

    @Qubitium
    CollaboratorAuthor

    Fixed by #4954 (squash-merged, c9c2d7e2a). The loader now resolves the flag through _requires_tokenizer(cls) = getattr(cls, "require_load_tokenizer", True), so a plain-class double (or a definition that predates #4894) keeps the text path instead of raising AttributeError; an explicit False still skips it. Both red files go green (test_gguf_load_policy_env_removal, test_lazy_turtle_conversion_cache), and the full nine-file ModelLoader sweep is 112 passed.

  4. Qubitium commented on Nov 17, 2026

    @Qubitium
    CollaboratorAuthor

    Follow-up note on scope: #4957 (by a parallel agent) also landed while this was in flight and added require_load_tokenizer = True to the two doubles named here, so main now has both fixes and they compose — the doubles declare the attribute, and _requires_tokenizer(cls) means the next plain-class double does not have to.

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