Skip to content

Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦

C

fix(tests): skip efficiency tests when glm_tiny fixture is absent (CI #360)

woolcoxmcf126cbcf969
diff --git a/c/tests/test_inefficiency.py b/c/tests/test_inefficiency.py
index 0a5eb650..00d8b58b 100644
--- a/c/tests/test_inefficiency.py
+++ b/c/tests/test_inefficiency.py
@@ -31,7 +31,25 @@ TINY = C_DIR / "glm_tiny"
def _engine_present() -> bool:
- return ENGINE.exists()
+ """True iff BOTH the built engine AND the tiny fixture are available.
+
+ These tests need glm.exe (a build artifact) AND glm_tiny/ (a generated
+ fixture, gitignored). CI runs `make check` = "dependency-free tests, no
+ model downloads" (workflow .github/workflows/check.yml, by design #140), so
+ neither is present there and these tests must SKIP rather than fail. They
+ run locally after `make glm.exe` (glm_tiny ships alongside the source, or
+ is regenerated by tools/make_glm_oracle.py).
+ """
+ return ENGINE.exists() and (TINY / "config.json").exists()
+
+
+def _skip_reason() -> str:
+ """Name exactly which prerequisite is missing, so the skip is actionable."""
+ if not ENGINE.exists():
+ return "glm.exe not built (run: make glm.exe)"
+ if not (TINY / "config.json").exists():
+ return "glm_tiny fixture absent (gitignored; ship it locally or run tools/make_glm_oracle.py)"
+ return ""
def _cuda_available() -> bool:
@@ -66,7 +84,7 @@ def _cuda_available() -> bool:
return False
[email protected](_engine_present(), "glm.exe not built (run: make glm.exe)")
[email protected](_engine_present(), _skip_reason() or "glm.exe + glm_tiny required")
class TinyEfficiencyTest(unittest.TestCase):
"""Asserted regression tests on the resident tiny model. Gates CI."""
@@ -156,7 +174,7 @@ class TinyEfficiencyTest(unittest.TestCase):
@unittest.skipUnless(_cuda_available(),
- "CUDA build not present (run: make clean && make glm.exe CUDA_DLL=1 && make cuda-dll)")
+ _skip_reason() or "CUDA build not present (run: make clean && make glm.exe CUDA_DLL=1 && make cuda-dll)")
class TinyCudaEfficiencyTest(unittest.TestCase):
"""CUDA-path regression tests on the tiny model. Skip unless CUDA built.