mwcvitkovic / Supervised-Learning-on-Relational-Databases-with-GNNs

Code to reproduce the results in the paper Supervised Learning on Relational Databases with Graph Neural Networks.
MIT License
59 stars 14 forks source link

ModuleNotFoundError: No module named 'neo4j.time' #4

Open mo666666 opened 1 year ago

mo666666 commented 1 year ago

Hello, mwcvitkovic! Thank you for your previous kind replies! However, when I run the code with the command python -m experiments.GNN.PoolMLP, I encounter the following bug:

0%|                                                                                        | 0/182 [00:01<?, ?it/s]
0%|                                                                                        | 0/300 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "/data/moyichuan/miniconda3/envs/RDB/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/data/moyichuan/miniconda3/envs/RDB/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/data/moyichuan/supervised_learning_on_graph/start_training.py", line 506, in <module>
    main(kwargs)
  File "/data/moyichuan/supervised_learning_on_graph/start_training.py", line 441, in main
    train_model(writer, **kwargs)
  File "/data/moyichuan/supervised_learning_on_graph/start_training.py", line 323, in train_model
    raise e
  File "/data/moyichuan/supervised_learning_on_graph/start_training.py", line 276, in train_model
    val_auroc, val_acc, val_loss = validate_model(writer, val_loader, model, epoch)
  File "/data/moyichuan/supervised_learning_on_graph/start_training.py", line 79, in validate_model
    for batch_idx, (input, label) in enumerate(tqdm(val_loader)):
  File "/data/moyichuan/miniconda3/envs/RDB/lib/python3.6/site-packages/tqdm/std.py", line 1195, in __iter__
    for obj in iterable:
  File "/data/moyichuan/miniconda3/envs/RDB/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
    data = self._next_data()
  File "/data/moyichuan/miniconda3/envs/RDB/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
    return self._process_data(data)
  File "/data/moyichuan/miniconda3/envs/RDB/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
    data.reraise()
  File "/data/moyichuan/miniconda3/envs/RDB/lib/python3.6/site-packages/torch/_utils.py", line 425, in reraise
    raise self.exc_type(msg)
ModuleNotFoundError: Caught ModuleNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/data/moyichuan/miniconda3/envs/RDB/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
    data = fetcher.fetch(index)
  File "/data/moyichuan/miniconda3/envs/RDB/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/data/moyichuan/miniconda3/envs/RDB/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/data/moyichuan/supervised_learning_on_graph/data/DatabaseDataset.py", line 88, in __getitem__
    dp = pickle.load(f)
ModuleNotFoundError: No module named 'neo4j.time'

Do you have any ideas about this bug? Look forward to your further replies.

mwcvitkovic commented 1 year ago

Were you able to do all the preceding steps in the README, and everything installed correctly?

If so and you still had this problem, my guess is that neo4j has been updated. I should have included versions for all the packages in environment.yml. Not doing so was a mistake on my part. Sorry!

You'll have to go back and look what version of neo4j was released around the time of my last commit to the repo and update environment.yml with it.

If you figure out which version of neo4j works and this fixes the issue, I'd appreciate it if you'd make a PR to update environment.yml!