Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
frostedoyster committed Dec 17, 2024
1 parent 39a7a61 commit c92b6ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/metatrain/experimental/nanopet/tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ def test_regression_train():

expected_output = torch.tensor(
[
[-0.162086308002],
[-0.022639814764],
[0.000784173608],
[0.019549306482],
[0.063824191689],
[0.99948340654373168945],
[0.58770644664764404297],
[0.26674023270606994629],
[0.53543293476104736328],
[0.25562191009521484375],
]
)

Expand Down
4 changes: 2 additions & 2 deletions tests/utils/test_llpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_llpr(tmpdir):
params.append(param.squeeze())
weights = torch.cat(params)

n_ensemble_members = 10000
n_ensemble_members = 1000000 # converges slowly...
llpr_model.calibrate(dataloader)
llpr_model.generate_ensemble({"energy": weights}, n_ensemble_members)
assert "energy_ensemble" in llpr_model.capabilities.outputs
Expand Down Expand Up @@ -143,7 +143,7 @@ def test_llpr(tmpdir):
)

torch.testing.assert_close(
analytical_uncertainty, ensemble_uncertainty, rtol=1e-2, atol=1e-2
analytical_uncertainty, ensemble_uncertainty, rtol=5e-3, atol=0.0
)


Expand Down

0 comments on commit c92b6ed

Please sign in to comment.