Skip to content

Commit

Permalink
Do not disable rascaline's logger (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
frostedoyster authored Mar 15, 2024
1 parent 555c01c commit cc9fbc9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ build-backend = "setuptools.build_meta"

[project.optional-dependencies]
soap-bpnn = [
"rascaline-torch @ git+https://github.com/luthaf/rascaline@ae05064#subdirectory=python/rascaline-torch",
"rascaline-torch @ git+https://github.com/luthaf/rascaline@211511f#subdirectory=python/rascaline-torch",
]
alchemical-model = [
"torch_alchemical @ git+https://github.com/abmazitov/torch_alchemical.git@357a01f",
Expand Down
4 changes: 0 additions & 4 deletions src/metatensor/models/experimental/soap_bpnn/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pathlib import Path
from typing import Dict, List, Optional, Tuple, Union

import rascaline
import torch
from metatensor.learn.data import DataLoader
from metatensor.learn.data.dataset import _BaseDataset
Expand All @@ -30,9 +29,6 @@
logger = logging.getLogger(__name__)


# disable rascaline logger
rascaline.set_logging_callback(lambda x, y: None)

# Filter out the second derivative and device warnings from rascaline-torch
warnings.filterwarnings("ignore", category=UserWarning, message="second derivative")
warnings.filterwarnings(
Expand Down
3 changes: 1 addition & 2 deletions src/metatensor/models/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
from pathlib import Path
from typing import Any, Union

import metatensor.torch
import torch
from metatensor.torch.atomistic import (
MetatensorAtomisticModel,
ModelCapabilities,
ModelMetadata,
)

import metatensor


# This import is necessary to avoid errors when loading an
# exported alchemical model, which depends on sphericart-torch.
Expand Down

0 comments on commit cc9fbc9

Please sign in to comment.