Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
28 changes: 15 additions & 13 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
matrix:
os: ['ubuntu-24.04', 'ubuntu-24.04-arm', 'macos-15-intel', 'macos-15', 'windows-2022']
arch: ['arm64', 'x86_64']
torch-version: ['2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '2.8', '2.9']
torch-version: ['2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '2.8', '2.9', '2.10']
exclude:
# remove mismatched arch-os combinations
- {os: macos-15-intel, arch: arm64}
Expand All @@ -47,6 +47,7 @@ jobs:
- {os: macos-15-intel, arch: x86_64, torch-version: '2.7'}
- {os: macos-15-intel, arch: x86_64, torch-version: '2.8'}
- {os: macos-15-intel, arch: x86_64, torch-version: '2.9'}
- {os: macos-15-intel, arch: x86_64, torch-version: '2.10'}
include:
# add `cibw-arch` and `rust-target` to the different configurations
- name: x86_64 Linux
Expand Down Expand Up @@ -84,6 +85,7 @@ jobs:
- {torch-version: '2.7', cibw-python: 'cp312-*'}
- {torch-version: '2.8', cibw-python: 'cp312-*'}
- {torch-version: '2.9', cibw-python: 'cp312-*'}
- {torch-version: '2.10', cibw-python: 'cp312-*'}
steps:
- uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -311,16 +313,16 @@ jobs:
include:
- os: ubuntu-24.04
rust-target: x86_64-unknown-linux-gnu
torch-version: "2.9"
libtorch-url: https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-2.9.0%2Bcpu.zip
torch-version: "2.10"
libtorch-url: https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-2.10.0%2Bcpu.zip
- os: macos-15
rust-target: aarch64-apple-darwin
torch-version: "2.9"
libtorch-url: https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.9.0.zip
torch-version: "2.10"
libtorch-url: https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.10.0.zip
- os: windows-2022
rust-target: x86_64-pc-windows-msvc
torch-version: "2.9"
libtorch-url: https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-2.9.0%2Bcpu.zip
torch-version: "2.10"
libtorch-url: https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-2.10.0%2Bcpu.zip
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -344,9 +346,9 @@ jobs:

- name: setup libmetatensor
run: |
curl -L -O https://github.com/metatensor/metatensor/releases/download/metatensor-core-v0.1.17/metatensor-core-cxx-0.1.17.tar.gz
tar xf metatensor-core-cxx-0.1.17.tar.gz
cmake -B build-metatensor -S metatensor-core-cxx-0.1.17 \
curl -L -O https://github.com/metatensor/metatensor/releases/download/metatensor-core-v0.1.19/metatensor-core-cxx-0.1.19.tar.gz
tar xf metatensor-core-cxx-0.1.19.tar.gz
cmake -B build-metatensor -S metatensor-core-cxx-0.1.19 \
-DMETATENSOR_INSTALL_BOTH_STATIC_SHARED=OFF \
-DCMAKE_INSTALL_PREFIX=$CMAKE_PREFIX_PATH \
-DCMAKE_BUILD_TYPE=Debug
Expand All @@ -355,9 +357,9 @@ jobs:

- name: setup libmetatensor-torch
run: |
curl -L -O https://github.com/metatensor/metatensor/releases/download/metatensor-torch-v0.8.2/metatensor-torch-cxx-0.8.2.tar.gz
tar xf metatensor-torch-cxx-0.8.2.tar.gz
cmake -B build-metatensor-torch -S metatensor-torch-cxx-0.8.2 \
curl -L -O https://github.com/metatensor/metatensor/releases/download/metatensor-torch-v0.8.4/metatensor-torch-cxx-0.8.4.tar.gz
tar xf metatensor-torch-cxx-0.8.4.tar.gz
cmake -B build-metatensor-torch -S metatensor-torch-cxx-0.8.4 \
-DCMAKE_INSTALL_PREFIX=$CMAKE_PREFIX_PATH \
-DCMAKE_BUILD_TYPE=Debug
cmake --build build-metatensor-torch --config Debug
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/torch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ jobs:
numpy-version-pin: "<2.0"
- os: ubuntu-24.04
python-version: "3.10"
torch-version: "2.9"
torch-version: "2.10"
- os: ubuntu-24.04
python-version: "3.13"
torch-version: "2.9"
torch-version: "2.10"
- os: macos-15
python-version: "3.13"
torch-version: "2.9"
torch-version: "2.10"
- os: windows-2022
python-version: "3.13"
torch-version: "2.9"
torch-version: "2.10"
steps:
- uses: actions/checkout@v6
with:
Expand Down
1 change: 1 addition & 0 deletions metatomic-torch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ a changelog](https://keepachangelog.com/en/1.1.0/) format. This project follows

### Added

- Added support for torch v2.10
- Added support for loading TorchScript extensions from deepmd-kit (#98)

## [Version 0.1.6](https://github.com/metatensor/metatomic/releases/tag/metatomic-torch-v0.1.6) - 2025-11-14
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ filterwarnings = [
"ignore:ast.Str is deprecated and will be removed in Python 3.14:DeprecationWarning",
"ignore:Attribute s is deprecated and will be removed in Python 3.14:DeprecationWarning",
"ignore:ast.NameConstant is deprecated and will be removed in Python 3.14:DeprecationWarning",
"ignore:`torch.jit.script` is deprecated. Please switch to `torch.compile` or `torch.export`:DeprecationWarning",
"ignore:`torch.jit.save` is deprecated. Please switch to `torch.export`:DeprecationWarning",
]

### ======================================================================== ###
Expand Down
20 changes: 10 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ description =
deps =
{[testenv]packaging_deps}
{[testenv]metatensor_deps}
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.9}.*
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.10}.*

commands =
pip wheel python/metatomic_torch {[testenv]build_single_wheel} --wheel-dir {envtmpdir}/dist
Expand All @@ -73,7 +73,7 @@ package = skip
deps =
cmake
{[testenv]metatensor_deps}
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.9}.*
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.10}.*

commands =
# configure cmake
Expand All @@ -82,7 +82,7 @@ commands =
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_PREFIX_PATH={env_site_packages_dir}/metatensor/;\
{env_site_packages_dir}/torch/;\
{env_site_packages_dir}/metatensor/torch/torch-{env:METATOMIC_TESTS_TORCH_VERSION:2.9}/ \
{env_site_packages_dir}/metatensor/torch/torch-{env:METATOMIC_TESTS_TORCH_VERSION:2.10}/ \
-DMETATOMIC_TORCH_TESTS=ON

# build code with cmake
Expand All @@ -97,7 +97,7 @@ package = skip
deps =
cmake
{[testenv]metatensor_deps}
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.9}.*
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.10}.*

commands =
# configure, build and install metatomic-torch
Expand All @@ -106,7 +106,7 @@ commands =
-DCMAKE_INSTALL_PREFIX={env_dir}/usr/ \
-DCMAKE_PREFIX_PATH={env_site_packages_dir}/metatensor/;\
{env_site_packages_dir}/torch/;\
{env_site_packages_dir}/metatensor/torch/torch-{env:METATOMIC_TESTS_TORCH_VERSION:2.9}/ \
{env_site_packages_dir}/metatensor/torch/torch-{env:METATOMIC_TESTS_TORCH_VERSION:2.10}/ \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON
cmake --build {env_dir}/build-metatomic-torch --config Debug --parallel --target install
Expand All @@ -116,7 +116,7 @@ commands =
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_PREFIX_PATH={env_site_packages_dir}/metatensor/;\
{env_site_packages_dir}/torch/;\
{env_site_packages_dir}/metatensor/torch/torch-{env:METATOMIC_TESTS_TORCH_VERSION:2.9}/;\
{env_site_packages_dir}/metatensor/torch/torch-{env:METATOMIC_TESTS_TORCH_VERSION:2.10}/;\
{env_dir}/usr/ \
-DUSE_CMAKE_SUBDIRECTORY=OFF

Expand All @@ -128,7 +128,7 @@ commands =
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_PREFIX_PATH={env_site_packages_dir}/metatensor/;\
{env_site_packages_dir}/torch/;\
{env_site_packages_dir}/metatensor/torch/torch-{env:METATOMIC_TESTS_TORCH_VERSION:2.9}/ \
{env_site_packages_dir}/metatensor/torch/torch-{env:METATOMIC_TESTS_TORCH_VERSION:2.10}/ \
-DUSE_CMAKE_SUBDIRECTORY=ON

cmake --build {env_dir}/build-subdirectory --config Debug --parallel
Expand All @@ -143,7 +143,7 @@ description = Run the tests of the metatomic-torch Python package
deps =
{[testenv]testing_deps}
{[testenv]metatensor_deps}
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.9}.*
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.10}.*
numpy {env:METATOMIC_TESTS_NUMPY_VERSION_PIN}
vesin
ase
Expand All @@ -170,7 +170,7 @@ description = Run the doctests defined in any metatomic package
deps =
{[testenv]testing_deps}

torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.9}.*
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.10}.*
numpy {env:METATOMIC_TESTS_NUMPY_VERSION_PIN}
vesin
ase
Expand Down Expand Up @@ -227,7 +227,7 @@ deps =
sphinxcontrib-details-directive # hide some information by default in HTML

# required for autodoc
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.9}.*
torch=={env:METATOMIC_TESTS_TORCH_VERSION:2.10}.*

# required for examples
ase
Expand Down
Loading