Skip to content
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

Update environment file #329

Merged
merged 4 commits into from
Jun 10, 2024
Merged

Update environment file #329

merged 4 commits into from
Jun 10, 2024

Conversation

RaulPPelaez
Copy link
Collaborator

The env file is a little behind, this PR tries to relax the pins in environment.yml.

@RaulPPelaez
Copy link
Collaborator Author

Using forward instead of call here:

class FloatCastDatasetWrapper(T.BaseTransform):
"""A transform that casts all floating point tensors to a given dtype.
tensors to a given dtype.
"""
def __init__(self, dtype=torch.float64):
super(FloatCastDatasetWrapper, self).__init__()
self._dtype = dtype
def forward(self, data):
for key, value in data:
if torch.is_tensor(value) and torch.is_floating_point(value):
setattr(data, key, value.to(self._dtype))
return data

makes tmdnet incompatible with pytorch_geometric versions older than 2.5. Its a simple change to get both versions to work, so I changed it.

This is BaseTrasnform in 2.5:
https://pytorch-geometric.readthedocs.io/en/latest/_modules/torch_geometric/transforms/base_transform.html#BaseTransform
This is in 2.3:
https://pytorch-geometric.readthedocs.io/en/2.3.0/_modules/torch_geometric/transforms/base_transform.html

@RaulPPelaez
Copy link
Collaborator Author

cc @stefdoerr could you please review?

@RaulPPelaez RaulPPelaez merged commit 440f985 into torchmd:main Jun 10, 2024
2 checks passed
@RaulPPelaez RaulPPelaez deleted the update_env branch June 20, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants