Skip to content

Commit e4091bb

Browse files
committed
Fix: Bypass pathways model not found import error by mocking pathwaysutil library for common/test_util.py
1 parent 158d95d commit e4091bb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

axlearn/common/test_utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
from typing import Any, NamedTuple, Optional, Protocol, TypeVar, Union
1616
from unittest.mock import patch
1717

18+
# For bypass pathwaysutil import error
19+
import sys
20+
from unittest.mock import MagicMock
21+
fakePathwaysuitls = MagicMock()
22+
sys.modules['pathwaysutils'] = fakePathwaysuitls
23+
1824
import jax
1925
import jax.random
2026
import numpy as np

0 commit comments

Comments
 (0)