Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Hongyu-yu committed Oct 25, 2024
1 parent a617d6d commit 7ed86ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mace/modules/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def forward(

def _make_tracing_inputs(self, n: int):
return [
{"forward": (torch.randn(6, self.irreps_in.dim), torch.zeros(2))}
{"forward": (torch.randn(6, self.irreps_in.dim), None)}
for _ in range(n)
]

Expand Down Expand Up @@ -142,7 +142,7 @@ def forward(

def _make_tracing_inputs(self, n: int):
return [
{"forward": (torch.randn(6, self.irreps_in.dim), torch.zeros(2))}
{"forward": (torch.randn(6, self.irreps_in.dim), None)}
for _ in range(n)
]

Expand Down
1 change: 1 addition & 0 deletions mace/tools/MultKAN_jit.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=all
import os
import random

Expand Down
5 changes: 2 additions & 3 deletions mace/tools/scripts_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def radial_to_transform(radial):
.non_linearity._modules["acts"][0]
.f
if model.num_interactions.item() > 1
and hasattr(model, "KAN_readout") == False
and hasattr(model, "KAN_readout") is False
else None
),
"atomic_energies": model.atomic_energies_fn.atomic_energies.cpu().numpy(),
Expand All @@ -223,9 +223,8 @@ def radial_to_transform(radial):

def extract_load(f: str, map_location: str = "cpu") -> torch.nn.Module:
return extract_model(
torch.load(f=f, map_location=map_location),
torch.load(f=f, map_location=map_location, pickle_module=dill),
map_location=map_location,
pickle_module=dill,
)


Expand Down

0 comments on commit 7ed86ba

Please sign in to comment.