pytorch_geometric icon indicating copy to clipboard operation
pytorch_geometric copied to clipboard

pytorch-lightning version for graphgym

Open LindaSt opened this issue 2 years ago • 3 comments

😵 Describe the installation problem

Hi!

What version of pytorch-lightning was GraphGym tested with? I could not find that info anywhere. I've installed 1.6.3, and I get a bunch of warnings (see below).

Also, I could not figure out which keyword is necessary to set to get it to run on GPU. I suspect this might also be a pytorch-lightning version issue, based on the warning.

I've been trying to run one of the provided examples python main.py --cfg configs/pyg/example_graph.yaml --repeat 3 # graph classification.

pytorch_lightning/trainer/trainer.py:1812: PossibleUserWarning: GPU available but not used. Set `accelerator` and `devices` using `Trainer(accelerator='gpu', devices=8)`.

pytorch_lightning/trainer/connectors/data_connector.py:240: PossibleUserWarning: The dataloader, train_dataloader, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 64 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.

pytorch_geometric/torch_geometric/graphgym/logger.py:293: LightningDeprecationWarning: `Trainer.lr_schedulers` is deprecated in v1.6 and will be removed in v1.8. You can use `trainer.lr_scheduler_configs` instead which contains dataclasses instead of dictionaries.
  lr=trainer.lr_schedulers[0]['scheduler'].get_last_lr()[0],

Thanks a lot!

Environment

  • PyG version: latest
  • PyTorch version: 1.11.0
  • OS: Linux cluster
  • Python version: 3.8
  • CUDA/cuDNN version: 11.3
  • How you installed PyTorch and PyG: conda
  • Any other relevant information: pytorch-lightning 1.6.3

LindaSt avatar Aug 02 '22 15:08 LindaSt

@aniketmaurya Can you look into it? Let me know!

rusty1s avatar Aug 03 '22 15:08 rusty1s

hey @LindaSt, thanks for reporting this issue! It was tested with PL 1.6.3.

I have created a PR for the "GPU not being used" issue.

For the dataloader workers warning, I believe you can provide num_workers as a command argument based on the number of CPU cores. CMIIW @rusty1s

I will create a PR to update the scheduler API, you can use it without any issue till PL 1.8 though (the current version is 1.7)

aniketmaurya avatar Aug 04 '22 10:08 aniketmaurya

Thanks @aniketmaurya!

rusty1s avatar Aug 04 '22 10:08 rusty1s