Skip to content

Commit

Permalink
fix: limit numpy version to < 2.0 and fix missing dependency (#10537)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x404 committed Jun 20, 2024
1 parent 9cf3ee5 commit 850b4ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
black==19.10b0; python_version >= "3.6"
click==8.0.0; python_version >= "3.6" # https://github.com/psf/black/issues/2964
numpy>=1.21.6
numpy>=1.21.6, <2.0
protobuf>=3.9.2, <4.0
wheel
tqdm
Expand All @@ -16,3 +16,4 @@ pytest-xdist
pytest-repeat
rich
portalocker
typing-extensions>=4.0.0, <5.0
2 changes: 1 addition & 1 deletion python/oneflow/mock_torch/mock_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from collections import deque
from importlib import import_module

if sys.version_info < (3, 8):
if sys.version_info <= (3, 8):
try:
from importlib_metadata import requires
except ImportError:
Expand Down
3 changes: 2 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ def get_version():


REQUIRED_PACKAGES = [
f"numpy>={np.__version__}",
f"numpy>={np.__version__}, <2.0",
"protobuf>=3.9.2, <4.0",
"typing-extensions>=4.0.0, <5.0",
"tqdm",
"requests",
"pillow",
Expand Down

0 comments on commit 850b4ad

Please sign in to comment.