snap-stanford / ogb

Benchmark datasets, data loaders, and evaluators for graph machine learning
https://ogb.stanford.edu
MIT License
1.89k stars 398 forks source link

LSC training example crashes on CPU only machine #122

Closed ableiweiss closed 3 years ago

ableiweiss commented 3 years ago

I had to modify the code to run properly on CPU, as calls to the PyTorch Lightning Trainers assume GPU availability. See for example line 228 in mag240m/gnn.py, added the accelerator param to make it run.

trainer = Trainer(accelerator ='ddp_cpu', max_epochs=args.epochs, callbacks=[checkpoint_callback], default_root_dir=f'logs/{args.model}')

weihua916 commented 3 years ago

Thanks for the information! I'd assume most users will have the GPU environment, so I will close this issue for now. This is good to have on the Github discussion page.