You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TEST] test_paro_prewarm_rotation_extension_skips_unsupported_configs fails after any earlier test loads the Paro rotation extension (patches .load, product short-circuits on _ROTATION_EXTENSION_READY) #5430
Found on main @ 1405751, AMD Radeon AI PRO R9700 (gfx1201), torch 2.16 dev ROCm 10.1, transformers 5.23.0. The mechanism does not depend on the platform.
What is wrong
tests/test_paro.py::test_paro_prewarm_rotation_extension_skips_unsupported_configs (tests/test_paro.py:2694-2718) monkeypatches paro_utils_module._PARO_ROTATION_EXTENSION.load and then expects that prewarm_paro_rotation_extension(fused_rotation=True, group_size=128, krot=8) calls it exactly once (assert calls == ["load"]). The product path never reaches that attribute when the extension is already loaded in the process:
_load_rotation_extension (gptqmodel/utils/paro.py:443-448) returns True straight away from the module global _ROTATION_EXTENSION_READY, and otherwise asks _extension_api().is_available("paro"), not _PARO_ROTATION_EXTENSION.load.
So the test passes only when it is the first thing in the process to touch the Paro rotation extension. Any earlier test in the same pytest session that runs a real fused rotation (on GPU) sets _ROTATION_EXTENSION_READY = True, and this test then fails.
tests/test_paro.py on its own passes (243 passed).
Suggested fix
In the test, monkeypatch.setattr(paro_utils_module, "_ROTATION_EXTENSION_READY", False), and patch the call the product actually makes (_extension_api().is_available or _load_rotation_extension) instead of _PARO_ROTATION_EXTENSION.load.
Severity: low (test only). It is red on any GPU lane that runs the Paro test files in one session.
Agent claim:agent-4e3a0639ecaf is working on this issue now.
Started 2026-11-19T05:22:38Z. The claim expires 4.0h after this comment is last edited (heartbeat). Other agents: do not start this issue while the claim is live.
Scope: Make test_paro_prewarm_rotation_extension_skips_unsupported_configs independent of earlier tests: patch the seam the product path actually uses (or reset the module-level ready flag) so the test does not depend on process-global extension state.
The test now patches the seam the product actually calls, _load_rotation_extension, instead of _PARO_ROTATION_EXTENSION.load. That is already how the neighbouring tests in tests/test_paro.py spy on the same helper (:2839, :2904, :6277), so the gating contract is unchanged: unsupported configs return False without attempting a load, and the supported one attempts exactly one.
I also added test_paro_prewarm_reports_true_when_the_extension_is_already_loaded, which pins the process state that made the old test fail: with _ROTATION_EXTENSION_READY already True, a prewarm must return True without probing is_available or rebuilding. That guards the product short-circuit the old test accidentally depended on.
Activity
Qubitium commentedon Nov 19, 2026
Agent claim:
agent-4e3a0639ecafis working on this issue now.Started 2026-11-19T05:22:38Z. The claim expires 4.0h after this comment is last edited (heartbeat). Other agents: do not start this issue while the claim is live.
Scope: Make test_paro_prewarm_rotation_extension_skips_unsupported_configs independent of earlier tests: patch the seam the product path actually uses (or reset the module-level ready flag) so the test does not depend on process-global extension state.
test(paro): make the prewarm gating test independent of session state (…
Qubitium commentedon Nov 19, 2026
Fixed in
e09969306(PR #5442).The test now patches the seam the product actually calls,
_load_rotation_extension, instead of_PARO_ROTATION_EXTENSION.load. That is already how the neighbouring tests intests/test_paro.pyspy on the same helper (:2839,:2904,:6277), so the gating contract is unchanged: unsupported configs returnFalsewithout attempting a load, and the supported one attempts exactly one.I also added
test_paro_prewarm_reports_true_when_the_extension_is_already_loaded, which pins the process state that made the old test fail: with_ROTATION_EXTENSION_READYalreadyTrue, a prewarm must returnTruewithout probingis_availableor rebuilding. That guards the product short-circuit the old test accidentally depended on.Verified
Re-verified on
mainafter the merge (7a86e3cad):248 passed. All twelvetests/test_paro*.pyfiles in one session:311 passed.No product code changed: the short-circuit is correct and intentional; only the test was coupled to session state.
fix(config): reject NaN/inf in every numeric quantize option (#5437) (#…