Skip to content

test: fix two stale #4769 section A items (bits_new NATIVE_MODEL_ID, jamba mamba_ssm gate) - #5059

Merged
Qubitium merged 3 commits into
mainfrom
fix/test-triage-gates
Nov 18, 2026
Merged

Qubitium merged 3 commits into
mainfrom
fix/test-triage-gates

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Part of #4769 (section A). Both failures reproduce on this host at origin/main e1b22483; neither is environment-only.

1. tests/test_bits_new.py — 4 × KeyError: 'NATIVE_MODEL_ID'

Test.test_quant_and_eora did self.NATIVE_MODEL_ID = os.environ["NATIVE_MODEL_ID"] while the class-level assignments are commented out, so all four bits params fail on any host that does not export the variable.

Fix: default to the local /monster/data/model/Llama-3.2-1B-Instruct checkpoint (the convention of the other tests/test_*.py files), honour an explicit NATIVE_MODEL_ID verbatim — it may be a hub repo id, so it is not existence-checked — and pytest.skip with a precise reason only when an absolute local path is absent.

2. tests/test_jamba_support.py — PackageNotFoundError: mamba-ssm

test_tiny_jamba_gptq_quantization_smoke reaches GPTQModel.load(), which validates the definition's mamba-ssm requirement from distribution metadata and dies with StopIteration/PackageNotFoundError when the package is not installed. Gate only that test with pytest.importorskip("mamba_ssm"); the five CPU contract tests in the file do not need it and still run.

Verification (this host, origin/main e1b22483)

# before
pytest tests/test_bits_new.py tests/test_jamba_support.py -> 5 failed, 5 passed
  4 x KeyError: 'NATIVE_MODEL_ID'
  1 x StopIteration (mamba-ssm metadata)

# after (NATIVE_MODEL_ID=/nonexistent to exercise the new skip instead of
# starting an hours-long CPU eora quantize)
pytest tests/test_bits_new.py tests/test_jamba_support.py -> 5 passed, 5 skipped
  SKIPPED [4] test_bits_new.py:102: local checkpoint /nonexistent does not exist; ...
  SKIPPED [1] test_jamba_support.py:313: could not import 'mamba_ssm': ...
ruff check gptqmodel tests -> All checks passed

With the env var unset the default resolves to an existing absolute path (/monster/data/model/Llama-3.2-1B-Instruct, exists=True), so no skip fires and the test runs as before — verified by a bounded run that entered test_quant_and_eora with that model id and no KeyError.

Part of #4769.

- tests/test_bits_new.py: default NATIVE_MODEL_ID to the local
  Llama-3.2-1B-Instruct checkpoint and skip when neither the env var nor the
  default exists, instead of raising KeyError in all four params.
- tests/test_jamba_support.py: importorskip("mamba_ssm") in the smoke test
  only; the CPU contract tests above it do not need the package.

Verified: with NATIVE_MODEL_ID=/nonexistent the four bits params skip with
the new reason, and the unset-env default resolves to the existing local
checkpoint; the jamba smoke test skips with "could not import 'mamba_ssm'"
while the file's five CPU contract tests pass.
- tests/test_bits_new.py: `test_quant_and_eora` read
  `os.environ["NATIVE_MODEL_ID"]`, so all four params died with
  `KeyError: 'NATIVE_MODEL_ID'` on any host that does not export it. Default
  to the local Llama-3.2-1B-Instruct checkpoint, honour an explicit value
  verbatim (it may be a hub repo id), and skip with a precise reason when an
  absolute local path is absent.
- tests/test_jamba_support.py: the smoke test calls `GPTQModel.load()`, which
  validates the definition's `mamba-ssm` requirement and raises
  `PackageNotFoundError` when the metadata is absent. Gate only that test on
  `pytest.importorskip("mamba_ssm")`; the five CPU contract tests above it do
  not need the package.

Part of #4769.
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