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

Unable to use Custom Datasets - PyG or nx / Custom Loader? #69

Open
inesws opened this issue Nov 11, 2024 · 0 comments
Open

Unable to use Custom Datasets - PyG or nx / Custom Loader? #69

inesws opened this issue Nov 11, 2024 · 0 comments

Comments

@inesws
Copy link

inesws commented Nov 11, 2024

Hello,

I'm trying to use graphgym with my own datasets but it's proven to be rather difficult, also due to the lack of documentation on this argument.

If I understood, currently graphgym doesn't support PyG custom datasets, it should be in nx format?
The only example for the topic is in the custom loader, where a dataset from torch_geometric.datasets is imported and a loader is created, BUT, that's not really custom, right? I have my own Dataset, locally.

  1. I converted the graph data in MyDataset to networkx graphs and saved them in .pkl file, as it's seen in the "GraphGym/run/datasets/ws.pkl" example and saved it in the dataset folder.
  2. Then I created a new config file specified 'nx' as the format, as shown in the config file as in "run/configs/IDGNN/node.yaml" and in the "run/grids/IDGNN/node.txt".

Of course, when I run it there's the error " dataset = load_dataset()
File "C:(...)\site-packages\torch_geometric\graphgym\loader.py", line 192, in load_dataset
raise ValueError(f"Unknown data format '{format}'")
ValueError: Unknown data format 'nx'""
because I suppose I should created a custom loader and register it? But this is not shown in GraphGym for the IDGNN example!!
So I'm not sure how this loader should look like because the only example is importing a PyG dataset from torch_geometric.

Also, there's no instruction on how to actually use a custom loader. If a contribution is created there, how to make sure, when you run the experiment with main.py, it will use the custom loader?

Would be great to have some help on this issue.
Thank you!

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

No branches or pull requests

1 participant