-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests #146
Fix tests #146
Conversation
@PicoCentauri I have no clue what's going on with |
Although I haven't been able to pinpoint the issue, it seems that it is a bug caused by the interaction of python 3.8's standard libraries (pathlib, importlib which are used inside We have to drop either python 3.8 or hydra. For the moment, I've updated the code to require python 3.9 because it's the easiest solution (python 3.8 would have to be dropped soon-ish anyway), but we should also consider dropping hydra IMO. I will open an issue for it. |
@@ -123,7 +123,9 @@ def test_read_virial_warn(monkeypatch, tmp_path): | |||
ase.io.write(filename, systems) | |||
|
|||
with pytest.warns(match="Found 9-long numerical vector"): | |||
results = read_virial_ase(filename=filename, key="stress-9") | |||
results = read_virial_ase( | |||
filename=filename, key="stress-9", dtype=torch.get_default_dtype() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is float64 not working. Isn't the default one 64-bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyTorch default dtype
if the user does nothing is float32
@@ -36,7 +36,9 @@ def test_compute_model_loss(): | |||
model = soap_bpnn.Model(capabilities) | |||
# model = torch.jit.script(model) # jit the model for good measure | |||
|
|||
systems = read_systems(RESOURCES_PATH / "alchemical_reduced_10.xyz")[:2] | |||
systems = read_systems( | |||
RESOURCES_PATH / "alchemical_reduced_10.xyz", dtype=torch.get_default_dtype() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above I rather would like to set an explicit dtype here.
📚 Documentation preview 📚: https://metatensor-models--146.org.readthedocs.build/en/146/