Skip to content

Commit

Permalink
fix version check
Browse files Browse the repository at this point in the history
  • Loading branch information
Linux-cpp-lisp committed Jun 29, 2024
1 parent 4c5cd25 commit 5db1bd7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nequip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
torch_version = packaging.version.parse(torch.__version__)

# only allow 1.11*, 1.13* or higher (no 1.12.*)
assert (torch_version > packaging.version.parse("1.11.0")) and not (
packaging.version.parse("1.12.0")
<= torch_version
< packaging.version.parse("1.13.0")
assert (torch_version == packaging.version.parse("1.11")) or (
torch_version >= packaging.version.parse("1.13")
), f"NequIP supports PyTorch 1.11.* or 1.13.* or later, but {torch_version} found"

# warn if using 1.13* or 2.0.*
Expand Down

0 comments on commit 5db1bd7

Please sign in to comment.