Skip to content

Commit 9fc2f95

Browse files
committed
mock the mlflow __spec__
1 parent d21ac36 commit 9fc2f95

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tests/hooks/test_mlflow_tracking.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
# Ensure a mock 'mlflow' module exists so the example can be imported
1313
# without mlflow actually installed.
1414
if "mlflow" not in sys.modules:
15-
sys.modules["mlflow"] = MagicMock()
15+
_mock = MagicMock()
16+
_mock.__spec__ = None
17+
sys.modules["mlflow"] = _mock
1618

1719
from inspect_ai.hooks._hooks import (
1820
ModelUsageData,

0 commit comments

Comments
 (0)