Repository navigation
fix(looper): drop a leftover del g_h that fails the ruff gate (#5026) - #5047
Merged
Merged
Conversation
This was referenced Nov 18, 2026
Qubitium
added a commit
that referenced
this pull request
Nov 18, 2026
#5040 made `process()` call `task.release_hessian_state()` when `quantize()` raises; #5043's probe double predates that helper, so the probe fails with AttributeError instead of measuring the reference count. That leaves `tests/test_gptq_processor_hessian_lifetime_5026.py` red on main after #5047 removed the stale `del g_h`. Give the double a no-op hook.
This was referenced Nov 18, 2026
Qubitium
added a commit
that referenced
this pull request
Nov 18, 2026
) #5040 made `process()` call `task.release_hessian_state()` when `quantize()` raises; #5043's probe double predates that helper, so the probe fails with AttributeError instead of measuring the reference count. That leaves `tests/test_gptq_processor_hessian_lifetime_5026.py` red on main after #5047 removed the stale `del g_h`. Give the double a no-op hook.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#5043 (fix of #5026) left a
del g_hin_assert_expected_device()after the local binding was replaced by reading the Hessian's device throughg.H. The name is undefined, soruff'sF821fails onmain(gptqmodel/looper/gptq_processor.py:880), which blocks every PR's ruff gate.The line had no effect beyond the error: the preceding block only reads
g.Hin the assertion, so no local keeps the[C, C]accumulator alive. The comment now states the invariant ("no local may be bound here") instead of instructing adelof a name that does not exist.No behaviour change: the peak-memory property from #5026 (GPTAQ/FOEM rebind
H, so nothing must hold the original unpermuted copy acrossg.quantize()) is unchanged.Verification
ruff check gptqmodel/looper/gptq_processor.py→All checks passed!(wasF821 Undefined name g_h).tests/test_gptqprocessor_hessian_5026.pyand the GPTQ processor suites: unchanged code path (the assert block still readsg.H); run locally, same results as on fix(gptq): stop holding the task Hessian across g.quantize() (#5026) #5043's tree.Checklist
ruffgate onmain