Skip to content

Commit

Permalink
Fix regressiont test
Browse files Browse the repository at this point in the history
  • Loading branch information
frostedoyster committed Dec 17, 2024
1 parent 596ff08 commit 04a58a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/metatrain/experimental/phace/modules/cg.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def cg_combine_l1l2L(tensor12, cg_tensor):
)
return out_tensor.swapaxes(
1, 2
) # / (cg_tensor.shape[0]*cg_tensor.shape[1]*cg_tensor.shape[2])
)


def get_cg_coefficients(l_max):
Expand Down
2 changes: 2 additions & 0 deletions src/metatrain/experimental/phace/tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def test_regression_init():
length_unit="Angstrom", atomic_types=[1, 6, 7, 8], targets=targets
)
model = PhACE(MODEL_HYPERS, dataset_info)
model = torch.jit.script(model)

# Predict on the first five systems
systems = read_systems(DATASET_PATH)[:5]
Expand Down Expand Up @@ -106,6 +107,7 @@ def test_regression_train():
systems = [system.to(torch.float32) for system in systems]
for system in systems:
get_system_with_neighbor_lists(system, model.requested_neighbor_lists())
model = torch.jit.script(model)
output = model(
systems[:5],
{"mtt::U0": ModelOutput(quantity="energy", unit="", per_atom=False)},
Expand Down

0 comments on commit 04a58a0

Please sign in to comment.