zekarias-tilahun / SelfGNN

A PyTorch implementation of "SelfGNN: Self-supervised Graph Neural Networks without explicit negative sampling" paper, which appeared in The International Workshop on Self-Supervised Learning for the Web (SSL'21) @ the Web Conference 2021 (WWW'21).
29 stars 6 forks source link

reproduce problem #3

Closed yaominghong closed 3 years ago

yaominghong commented 3 years ago

Hello,your work is novel.I try to reproduce it,but I meet the same problem when I use python src/train.py command.The problem is following: Traceback (most recent call last): File "src/train.py", line 261, in main() File "src/train.py", line 257, in main train_eval(args) File "src/train.py", line 248, in train_eval trainer = ModelTrainer(args) File "src/train.py", line 24, in init self._init() File "src/train.py", line 33, in _init final_parts=args.final_parts, augumentation=self._aug) File "/mnt/SelfGNN/src/data.py", line 28, in init super().init(root=osp.join(root, name), transform=transform, pre_transform=pre_transform) File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch_geometric/data/in_memory_dataset.py", line 55, in init pre_filter) File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch_geometric/data/dataset.py", line 89, in init self._download() File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch_geometric/data/dataset.py", line 141, in _download self.download() File "/mnt/SelfGNN/src/data.py", line 32, in download utils.create_dirs(self.dirs) File "/mnt/SelfGNN/src/utils.py", line 182, in create_dirs os.makedirs(path, exist_ok=True) File "/root/miniconda3/envs/myconda/lib/python3.7/os.py", line 223, in makedirs mkdir(name, mode) FileNotFoundError: [Errno 2] No such file or directory: ''

Then I used python src/tune.py,it is wrong because of above error.

So I ask for your help.Thank you.

zekarias-tilahun commented 3 years ago

Hello, Thank you for trying our work. This could be because the root directory, which is by default ~/workspace/data/SelfGNN is not found in your machine. If you don't have the default root directory, try creating a data directory under SelfGNN as SelfGNN/data and try running it with the following instead.

python src/train.py --root ./data/

Or you can download the project again, since I have modified the default root directory to be ./data and it will be automatically created under SelfGNN, now you can try simply running

python src/train.py

Please note that this only runs for the default command line argument, don't forget to specify the arguments to place the files in a directory of your choice and make other modifications.

yaominghong commented 3 years ago

It works.Thanks for reply. It is really helpful.

zekarias-tilahun commented 3 years ago

I'm glad it helped!