Merge verified Odysseus fixes

This commit is contained in:
pewdiepie-archdaemon
2026-07-23 14:49:02 +00:00
parent 4c9a8ca115
commit d8a2059df8
117 changed files with 15693 additions and 3191 deletions
+7 -2
View File
@@ -1,7 +1,12 @@
from services.hwfit.image_models import rank_image_models, IMAGE_MODEL_REGISTRY
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():
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.