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

Fixed a warning issue when accessing the internal storage of the torch_geometric dataset and method iteration error. #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

koguhnhyeok
Copy link

Here is my version of pytorch and torch_geometric:
Pytorch: 2.1.0+cu11.8
torch_geometric: 2.4.0

1. Fixed a warning issue when accessing the internal storage of the torch_geometric dataset.
When running the loader_pyg.py code in the above environment, the following warning message occurred.

UserWarning: It is not recommended to directly access the internal storage format data of an 'InMemoryDataset'. If you are absolutely certain what you are doing, access the internal storage via InMemoryDataset._data instead to suppress this warning. Alternatively, you can access stacked individual attributes of every graph via dataset.{attr_name}.

So, I just follow the instruction of the pyg and change all the dataset.data.{attr_name} to dataset._data.{attr_name}

2. Solved a method iteration error when allocating the dataset._data.keys to the iteration object of the for statement
TypeError occurs when running lines 206 and 210 for key in dataset._data.keys:, because the dataset._data.keys are the bound method BaseData.keys of data in my torch_geometric version. So I added parentheses to return the list of the keys.

This is my first PR, so if you have any problems, please let me know! and thank you for your great project.

…h_geometric dataset and method iteration error.
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.

1 participant