Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking(pt): drop PyTorch 2.0 support #4383

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backend/find_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ def get_pt_requirement(pt_version: str = "") -> dict:
# https://github.com/astral-sh/uv/blob/main/PIP_COMPATIBILITY.md#local-version-identifiers
# luckily, .* (prefix matching) defined in PEP 440 can match any local version
# https://peps.python.org/pep-0440/#version-matching
f"torch=={Version(pt_version).base_version}.*"
if pt_version != ""
else "torch>=2a",
f"torch=={Version(pt_version).base_version}.*",
# https://github.com/pytorch/pytorch/commit/7e0c26d4d80d6602aed95cb680dfc09c9ce533bc
"torch>=2.1.0",
njzjz marked this conversation as resolved.
Show resolved Hide resolved
],
}

Expand Down
2 changes: 1 addition & 1 deletion doc/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DeePMD-kit does not use the TensorFlow v2 API but uses the TensorFlow v1 API (`t
- Model filename extension: `.pth`
- Checkpoint filename extension: `.pt`

[PyTorch](https://pytorch.org/) 2.0 or above is required.
[PyTorch](https://pytorch.org/) 2.1 or above is required.
njzjz marked this conversation as resolved.
Show resolved Hide resolved
njzjz marked this conversation as resolved.
Show resolved Hide resolved
While `.pth` and `.pt` are the same in the PyTorch package, they have different meanings in the DeePMD-kit to distinguish the model and the checkpoint.

### JAX {{ jax_icon }}
Expand Down
Loading