diff --git a/src/metatrain/experimental/nanopet/tests/test_regression.py b/src/metatrain/experimental/nanopet/tests/test_regression.py index c4c0aa3f9..ad3f19eb9 100644 --- a/src/metatrain/experimental/nanopet/tests/test_regression.py +++ b/src/metatrain/experimental/nanopet/tests/test_regression.py @@ -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], ] ) diff --git a/tests/utils/test_llpr.py b/tests/utils/test_llpr.py index 46e98f21e..a6be4583e 100644 --- a/tests/utils/test_llpr.py +++ b/tests/utils/test_llpr.py @@ -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 @@ -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 )