Skip to content

Commit 21fec00

Browse files
committed
fix torch dependency issue
1 parent 25c1984 commit 21fec00

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

requirements/requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ pythonnet==3.0.4; sys_platform=='win32'
44
click==8.1.7
55
pandas==2.2.3
66
numpy<2 # test: tolerate_version
7-
torch==2.5.1
7+
# torch 2.5.1 not available on darwin-x86_64:
8+
torch==2.5.1; sys_platform != 'darwin' or platform_machine != 'x86_64'
9+
torch; sys_platform == 'darwin' and platform_machine == 'x86_64' # test: ignore
810
tqdm==4.67.1
911
numba==0.60.0
1012
psutil==6.1.0

tests/test_requirements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def _read_requirements(file_path: str) -> Dict[str, Tuple[Requirement, str]]:
4949
with open(file_path) as file:
5050
for line in file:
5151
line = line.strip()
52-
if line and not line.startswith("#"):
52+
if line and not line.startswith("#") and not "test: ignore" in line:
5353
req_string, comment = _split_at_first_hash(line)
5454

5555
req_string = req_string.split(";")[0]

0 commit comments

Comments
 (0)