dgl icon indicating copy to clipboard operation
dgl copied to clipboard

Running error for all mini-batch runs within examples/pytorch/gcmc

Open chang-l opened this issue 3 years ago • 2 comments

🐛 Bug

Mini-batch sampling pipline update, one of the major features released in v0.8, has not been propagated to examples/pytorch/gcmc/train_sampling.py.

To Reproduce

Step(s) to reproduce the behavior:

(single GPU run)

  1. python3 train_sampling.py --data_name=ml-100k --use_one_hot_fea --gcn_agg_accum=stack --gpu 0

Traceback (most recent call last): File "/workspace/examples/gcmc/train_sampling.py", line 377, in run(0, n_gpus, args, devices, dataset) File "/workspace/examples/gcmc/train_sampling.py", line 202, in run sampler = dgl.dataloading.MultiLayerNeighborSampler([None], return_eids=True) TypeError: init() got an unexpected keyword argument 'return_eids'

Expected behavior

The case should run through (with single/multi-GPU settings)

Environment

  • DGL Version (e.g., 1.0): 0.9
  • Backend Library & Version (e.g., PyTorch 0.4.1, MXNet/Gluon 1.3): 1.12
  • OS (e.g., Linux): Ubuntu 20.04
  • How you installed DGL (conda, pip, source): source
  • Build command you used (if compiling from source):
  • Python version: 3.8.13
  • CUDA/cuDNN version (if applicable): 11.7
  • GPU models and configuration (e.g. V100): A100
  • Any other relevant information: torchtext 0.13.0

Additional context

The same type of error (mini-batch sampling update) is also happened to all TGN examples (examples/pytorch/tgn/train.py), where EdgeCollator is no longer a valid class name from latest dgl-v0.8x release...

chang-l avatar May 19 '22 18:05 chang-l

Fixed by #4082

jermainewang avatar Jul 25 '22 10:07 jermainewang

@jermainewang In fact, this issue has not been resolved because of the outdated DGL dataloader APIs. It seems train_sampling.py uses at least two features that have been deprecated: (1) Set return_eids=True in MultiLayerNeighborSampler to use dgl.EID later (no longer support in 0.8x) (2) Specify g_sampling in dataloader constructor (no longer support in 0.8x).

chang-l avatar Jul 25 '22 19:07 chang-l

This issue has been automatically marked as stale due to lack of activity. It will be closed if no further activity occurs. Thank you

github-actions[bot] avatar Aug 26 '22 01:08 github-actions[bot]