You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into two issues when trying to load a dataset.
with the TUDataset, the clean URL doesn't exist anymore. I changed tudataset.py -->
line 55: url_clean = ("https://www.chrsmrrs.com/graphkerneldatasets")
and that seems to work.
This error happened with any TUDataset and with OGB
When I load a dataset I get an error from dataset.py/
dataset = TUDataset(name='PROTEINS', clean=True)
Here's the error:
----> 2 dataset = TUDataset(name='PROTEINS', clean=False)
File ~/miniconda3/envs/GraphDLenv/lib/python3.8/site-packages/spektral/datasets/tudataset.py:66, in TUDataset.init(self, name, clean, **kwargs)
64 self.name = name
65 self.clean = clean
---> 66 super().init(**kwargs)
I uninstalled and reinstalled the package and it works now. I realized the issue - I implemented the dataset.read() method as outlined here (https://graphneural.network/data/, under "Dataset"), in the dataset.py script. Should I not have implemented read(self) in dataset.py ? It worked for my own data but was clearly what caused the issue as I explained above.
The implementation of this method:
class MyDataset(Dataset):
def read(self):
return [Graph(x=x, adj=adj, y=y) for x, adj, y in some_magic_list]
Is that meant to be implemented as a new custom class with custom name? I guess that would make sense, but I am always finding things I do not understand about classes.
In any event, thanks for the help!
I'm running into two issues when trying to load a dataset.
with the TUDataset, the clean URL doesn't exist anymore. I changed tudataset.py -->
line 55: url_clean = ("https://www.chrsmrrs.com/graphkerneldatasets")
and that seems to work.
This error happened with any TUDataset and with OGB
When I load a dataset I get an error from dataset.py/
dataset = TUDataset(name='PROTEINS', clean=True)
Here's the error:
----> 2 dataset = TUDataset(name='PROTEINS', clean=False)
File ~/miniconda3/envs/GraphDLenv/lib/python3.8/site-packages/spektral/datasets/tudataset.py:66, in TUDataset.init(self, name, clean, **kwargs)
64 self.name = name
65 self.clean = clean
---> 66 super().init(**kwargs)
File ~/miniconda3/envs/GraphDLenv/lib/python3.8/site-packages/spektral/data/dataset.py:119, in Dataset.init(self, transforms, datainputs, **kwargs)
116 self.download()
118 # Read graphs
--> 119 self.graphs = self.read(datainputs)
...
TypeError: read() takes 1 positional argument but 2 were given
I'm not wise enough in the ways of Python to know why it's not loading. Any help is appreciated, thanks for this awesome library!
The text was updated successfully, but these errors were encountered: