-
Notifications
You must be signed in to change notification settings - Fork 3
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
Float64 conversion #83
Conversation
openqdc/datasets/base.py
Outdated
from torch_geometric.data import Data | ||
from torch_geometric.loader import DataLoader | ||
|
||
return DataLoader( |
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.
Add support for num_workers, pin_memory and additional data loader arguments that can be passed (similar to how pyg dataloader does it.
openqdc/datasets/base.py
Outdated
@@ -546,6 +546,48 @@ def wrapper(idx): | |||
datum["idxs"] = idxs | |||
return datum | |||
|
|||
@classmethod |
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 class method? Why not a normal method and remove the additional arguments. Also, say I split my dataset in train and val dataset, after which I want to create dataloaders? Will this work?
Can we address this in a different PR?
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.
Also, we should test this if we are adding this feature.
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.
Ops, it was not supposed to be inside the PR. It was one of my custom piece of code that i use for utilities
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.
Removed
return { | ||
"atomic_inputs": np.float32, | ||
"position_idx_range": np.int32, | ||
"energies": np.float32, |
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.
Shouldn't it be np.float64
?
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.
Interaction energies don't use total energies so the energy values is fine at float32
openqdc/datasets/potential/dummy.py
Outdated
return { | ||
"atomic_inputs": np.float32, | ||
"position_idx_range": np.int32, | ||
"energies": np.float32, |
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.
As this is a potential dataset, shouldn't we do float64.
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.
This dataset is used for static testing and we should regenerate the data to be float64 in case. As the accuracy is not actually a real issue here I find that just overriding the energy type is good enough
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.
Yup, can we regenerate to follow the same format.
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.
Regerated to float64
Conversion to float64 for Potential Dataset