Squash Odysseus development history

This commit is contained in:
pewdiepie-archdaemon
2026-09-11 06:04:19 +00:00
parent e5c99a5eee
commit 6ee6502010
2050 changed files with 538359 additions and 57745 deletions
+14
View File
@@ -0,0 +1,14 @@
from services.hwfit import image_models
rank_image_models = image_models.rank_image_models
IMAGE_MODEL_REGISTRY = image_models.IMAGE_MODEL_REGISTRY
def test_rank_image_models_handles_non_dict_system(monkeypatch):
monkeypatch.setattr(image_models, "_fetch_hf_image_collection_models", lambda: [])
monkeypatch.setattr(image_models, "_discover_quant_repos", lambda *a, **k: {})
# `system` is the detected-hardware dict; if detection failed and returned
# None (or a non-dict), system.get(...) raised AttributeError. Treat a
# non-dict system as "unknown hardware" (no GPU) rather than crashing.
assert len(rank_image_models(None)) == len(IMAGE_MODEL_REGISTRY)
assert len(rank_image_models(123)) == len(IMAGE_MODEL_REGISTRY)