pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
21.32k stars 3.65k forks source link

ModuleNotFoundError: No module named 'torch_geometric.data.storage' #4732

Open Sigmafye opened 2 years ago

Sigmafye commented 2 years ago

😵 Describe the installation problem

I have this problem when I run the code writed years ago by the author a paper. If you could help me, I would very appreciate you!

Traceback (most recent call last): File "train_search.py", line 313, in main() File "train_search.py", line 177, in main train_dataset = GeoData.PPI(os.path.join(args.data, 'ppi'), split='train') File "/home/tie.xu/anaconda3/envs/sgas/lib/python3.6/site-packages/torch_geometric/datasets/ppi.py", line 55, in init self.data, self.slices = torch.load(self.processed_paths[0]) File "/home/tie.xu/anaconda3/envs/sgas/lib/python3.6/site-packages/torch/serialization.py", line 529, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/tie.xu/anaconda3/envs/sgas/lib/python3.6/site-packages/torch/serialization.py", line 702, in _legacy_load result = unpickler.load() ModuleNotFoundError: No module named 'torch_geometric.data.storage'

Environment

rusty1s commented 2 years ago

To me, this looks like the datasets were processed with PyG 2.0, while you are trying to load them with PyG 1.4. Can you try to remove any pre-processed datasets and try again?