Skip to content

docs: re-anchor contract refs after writer.py growth (#4864) - #4877

Merged
Qubitium merged 1 commit into
mainfrom
fix/issue-4864
Nov 17, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/issue-4864

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Fixes #4864.

What was stale

tests/test_docs_contract_refs.py pinned ModelWriter at writer.py:1886, but #4839 shifted the definition to writer.py:1935, so the guard was red on main:

AssertionError: docs/native-checkpoint-export.md cites `ModelWriter` at
gptqmodel/models/writer.py:1886, but it is defined at [1935]
1 failed, 19 passed

While auditing the same table I verified and corrected 15 other stale writer.py citations across native-checkpoint-export.md, adapter-rank-pattern-matching.md, auto-nf12-excluded-layers.md, checkpoint-compat.md, dtype-boundary-preservation.md, generation-config-round-trip.md, lora-eora-scaling.md, safetensors-reference-offload.md, trust-remote-code-isolation.md, embedding-checkpoint-shard-replacement.md and checkpoint-and-runtime-contracts.md (each re-checked with rg -n/sed -n against the current file). The test entry itself moved 1886 -> 1935; the contract check is not weakened.

Verification

  • pytest tests/test_docs_contract_refs.py -> 20 passed, exit 0
  • red-on-parent: the single case fails with the assertion above
  • ruff check gptqmodel tests docs -> clean

Residual risk

  • The guard still hard-codes line numbers, so the next writer.py edit above these symbols can break it again (the issue's derive-from-symbol alternative would weaken the 'doc cites this exact line' check).
  • Pre-existing stale refs in other modules (scale.py, fp8.py) were left untouched as unrelated.

@Qubitium
Qubitium merged commit ea727de into main Nov 17, 2026
6 checks passed
@Qubitium
Qubitium deleted the fix/issue-4864 branch November 17, 2026 17:54
Qubitium added a commit that referenced this pull request Nov 17, 2026
…dels

The remote branch also merged origin/main and fixed the `require_load_tokenizer`
test doubles (#4923), so the loader takes the branch's `cls.require_load_tokenizer`
gate plus its "local port reuses the normalized Tokenicer wrapper" comment.

* `docs/fusion-model-coverage.md` — kept this branch's generated table (its
  descriptions come from the fixture) and folded in the entries only main had:
  `sensenova_loop` row and the 208/102/106 counts.
* `docs/trust-remote-code-isolation.md` — kept this branch's rewrite and
  re-anchored its `writer.py` citations to the current definition (2638), which
  main re-anchored in #4877.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant