Skip to content

Commit

Permalink
Update to metatensor-torch v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed Apr 12, 2024
1 parent 0b0e00c commit 37563c3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ myst-parser # markdown => rst translation, used in extensions/rascaline_json
# dependencies for the tutorials
--extra-index-url https://download.pytorch.org/whl/cpu
metatensor
metatensor-torch >= 0.3.0,<0.4.0
metatensor-torch >= 0.4.0,<0.5.0
torch
chemfiles
matplotlib
Expand Down
2 changes: 1 addition & 1 deletion python/rascaline-torch/build-backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_requires_for_build_wheel(config_settings=None):
defaults = build_meta.get_requires_for_build_wheel(config_settings)
return defaults + [
"torch >= 1.12",
"metatensor-torch >=0.3.0,<0.4.0",
"metatensor-torch >=0.4.0,<0.5.0",
RASCALINE_DEP,
]

Expand Down
2 changes: 1 addition & 1 deletion python/rascaline-torch/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def git_extra_version():

install_requires = [
"torch >= 1.12",
"metatensor-torch >=0.3.0,<0.4.0",
"metatensor-torch >=0.4.0,<0.5.0",
]
if os.path.exists(RASCALINE_C_API):
# we are building from a git checkout
Expand Down
1 change: 1 addition & 0 deletions python/rascaline-torch/tests/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def test_export_as_metatensor_model(tmpdir):
capabilities = ModelCapabilities(
supported_devices=["cpu"],
interaction_range=HYPERS["cutoff"],
dtype="float64",
)
export = MetatensorAtomisticModel(model, ModelMetadata(), capabilities)

Expand Down
6 changes: 3 additions & 3 deletions rascaline-torch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ find_package(Torch 1.12 REQUIRED)
# ============================================================================ #
# Setup metatensor_torch

set(METATENSOR_FETCH_VERSION "0.3.0")
set(REQUIRED_METATENSOR_TORCH_VERSION "0.3")
set(METATENSOR_FETCH_VERSION "0.4.0")
set(REQUIRED_METATENSOR_TORCH_VERSION "0.4")
if (RASCALINE_TORCH_FETCH_METATENSOR_TORCH)
message(STATUS "Fetching metatensor-torch @ ${METATENSOR_FETCH_VERSION} from github")

Expand All @@ -68,7 +68,7 @@ if (RASCALINE_TORCH_FETCH_METATENSOR_TORCH)
FetchContent_Declare(
metatensor_torch
URL ${URL_ROOT}/metatensor-torch-v${METATENSOR_FETCH_VERSION}/metatensor-torch-cxx-${METATENSOR_FETCH_VERSION}.tar.gz
URL_HASH SHA256=9813f8f4bdaef3a85fb27ce5c8a1df0f3a84e93c54cd175ee78a28e80b3d52da
URL_HASH SHA256=bdc2fe9e6ed5b6f66a6f573343b74d9cf14af7f3d29519bc05f1894e8d0904be
)

if (CMAKE_VERSION VERSION_GREATER 3.18)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ metatensor-core-requirement =
metatensor-core >=0.1.0,<0.2.0

metatensor-torch-requirement =
metatensor-torch >=0.3.0,<0.4.0
metatensor-torch >=0.4.0,<0.5.0

build-single-wheel = --no-deps --no-build-isolation --check-build-dependencies
warning_options =
Expand Down

0 comments on commit 37563c3

Please sign in to comment.