Skip to content

Commit 908b28d

Browse files
committed
fix test
1 parent 319d88e commit 908b28d

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/advisor/test_estimates_internals.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import pytest
88

9-
from autointent._advisor import _estimates, _hub, run_preflight
9+
from autointent._advisor import _hub, run_preflight
1010
from autointent._advisor._estimates._formulas import _classify_severity, _ram_for_module, _vram_for_transformer
1111
from autointent._advisor._estimates._search_space import _extract_model_names, _max_int
1212
from autointent._advisor._hardware import HardwareProfile
@@ -44,10 +44,9 @@ def _fake_resolve(model_name: str) -> ModelMeta:
4444
def _offline(monkeypatch: pytest.MonkeyPatch) -> None:
4545
_hub.resolve_model.cache_clear()
4646
monkeypatch.setattr(_hub, "_is_warm_cached", lambda _name: False)
47-
# Inject deterministic ModelMeta per name; both the _hub re-export and the
48-
# _estimates rebinding need to be replaced for run_preflight to pick it up.
47+
# Resource phase calls `_hub.resolve_model(...)` via module reference, so
48+
# patching the symbol on `_hub` is enough.
4949
monkeypatch.setattr(_hub, "resolve_model", _fake_resolve)
50-
monkeypatch.setattr(_estimates, "resolve_model", _fake_resolve)
5150

5251

5352
def _profile(vram_gb: float = 16.0, accelerator: str = "cuda") -> HardwareProfile:

0 commit comments

Comments
 (0)