Skip to content

fix(looper): drop a leftover del g_h that fails the ruff gate (#5026) - #5047

Merged
Qubitium merged 1 commit into
mainfrom
root/ruff-g-h-5043ruff
Nov 18, 2026
Merged

Qubitium merged 1 commit into
mainfrom
root/ruff-g-h-5043ruff

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Summary

#5043 (fix of #5026) left a del g_h in _assert_expected_device() after the local binding was replaced by reading the Hessian's device through g.H. The name is undefined, so ruff's F821 fails on main (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.H in 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 a del of 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 across g.quantize()) is unchanged.

Verification

Checklist

  • Restores the ruff gate on main
  • No behaviour change

@Qubitium
Qubitium merged commit f4511e7 into main Nov 18, 2026
8 of 9 checks passed
@Qubitium
Qubitium deleted the root/ruff-g-h-5043ruff branch November 18, 2026 00:20
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant