Skip to content

Commit d22ec52

Browse files
committed
Ignore numpydoc issues for models
1 parent 5fbdc34 commit d22ec52

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

mlip_testing/calcs/models/models.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""Define classes for all models."""
2+
3+
# ruff: noqa: D101, D102, F401
4+
15
from __future__ import annotations
26

37
import dataclasses
@@ -35,12 +39,12 @@
3539

3640
# https://github.com/orbital-materials/orb-models
3741
@dataclasses.dataclass
38-
class OrbCalc:
42+
class OrbCalc: # numpydoc ignore=GL08
3943
name: str
4044
device: Device | None = None
4145
kwargs: dict = dataclasses.field(default_factory=dict)
4246

43-
def get_calculator(self, **kwargs):
47+
def get_calculator(self, **kwargs): # numpydoc ignore=GL08
4448
from orb_models.forcefield import pretrained
4549
from orb_models.forcefield.calculator import ORBCalculator
4650
import torch._dynamo
@@ -64,7 +68,7 @@ def get_calculator(self, **kwargs):
6468
return calc
6569

6670
@property
67-
def available(self) -> bool:
71+
def available(self) -> bool: # numpydoc ignore=GL08
6872
try:
6973
from orb_models.forcefield import pretrained
7074
from orb_models.forcefield.calculator import ORBCalculator
@@ -108,13 +112,13 @@ def available(self) -> bool:
108112

109113

110114
@dataclasses.dataclass
111-
class FairChemCalc:
115+
class FairChemCalc: # numpydoc ignore=GL08
112116
model_name: str
113117
task_name: str
114118
device: Device | str = "cpu"
115119
overrides: dict = dataclasses.field(default_factory=dict)
116120

117-
def get_calculator(self):
121+
def get_calculator(self): # numpydoc ignore=GL08
118122
from fairchem.core import FAIRChemCalculator, pretrained_mlip
119123
# torch.serialization.add_safe_globals([slice])
120124

@@ -124,7 +128,7 @@ def get_calculator(self):
124128
return FAIRChemCalculator(predictor, task_name=self.task_name)
125129

126130
@property
127-
def available(self) -> bool:
131+
def available(self) -> bool: # numpydoc ignore=GL08
128132
try:
129133
from fairchem.core import pretrained_mlip
130134

@@ -139,11 +143,11 @@ def available(self) -> bool:
139143

140144

141145
@dataclasses.dataclass
142-
class SumCalcWrapper:
146+
class SumCalcWrapper: # numpydoc ignore=GL08
143147
model_names: list[str]
144148
d3_kwargs: dict | None = None
145149

146-
def get_calculator(self):
150+
def get_calculator(self): # numpydoc ignore=GL08
147151
from ase import units
148152
from ase.calculators.mixing import SumCalculator
149153
import torch

0 commit comments

Comments
 (0)