-
Notifications
You must be signed in to change notification settings - Fork 79
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
Refactoring memmapped dataset classes #256
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RaulPPelaez
reviewed
Jan 24, 2024
That is really cool! Thanks! |
RaulPPelaez
approved these changes
Jan 24, 2024
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.
LGTM
Lets see if tests pass and then merge |
tests/test_dataset_comp6.py::test_dataset_s66x8 FAILED
______________________________ test_dataset_s66x8 ______________________________
def test_dataset_s66x8():
with TemporaryDirectory() as root:
> data_set = S66X8(root)
tests/test_dataset_comp6.py:15:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/share/miniconda3/envs/torchmd-net/lib/python3.11/site-packages/torchmdnet/datasets/comp6.py:41: in __init__
super().__init__(
/usr/share/miniconda3/envs/torchmd-net/lib/python3.11/site-packages/torchmdnet/datasets/memdataset.py:47: in __init__
super().__init__(root, transform, pre_transform, pre_filter)
/usr/share/miniconda3/envs/torchmd-net/lib/python3.11/site-packages/torch_geometric/data/dataset.py:102: in __init__
self._process()
/usr/share/miniconda3/envs/torchmd-net/lib/python3.11/site-packages/torch_geometric/data/dataset.py:228: in _process
if files_exist(self.processed_paths): # pragma: no cover
/usr/share/miniconda3/envs/torchmd-net/lib/python3.11/site-packages/torch_geometric/data/dataset.py:187: in processed_paths
files = self.processed_file_names
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <[AttributeError("'S66X8' object has no attribute 'idx_mm'") raised in repr()] S66X8 object at 0x7f16715fe310>
@property
def processed_file_names(self) -> Union[str, List[str], Tuple]:
r"""The name of the files in the :obj:`self.processed_dir` folder that
must be present in order to skip processing."""
> raise NotImplementedError
E NotImplementedError
/usr/share/miniconda3/envs/torchmd-net/lib/python3.11/site-packages/torch_geometric/data/dataset.py:58: NotImplementedError |
Cool! |
I see, there is a bit of a chicken-egg issue with the processed_file_names. I'll fix it |
… since the processed_file_names needs to be available before the process function
RaulPPelaez
approved these changes
Jan 24, 2024
You got it, shall we merge then? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I refactored all memmaped datasets into a separate class to reduce code duplication