awslabs / dgl-ke

High performance, easy-to-use, and scalable package for learning large-scale knowledge graph embeddings.
https://dglke.dgl.ai/doc/
Apache License 2.0
1.28k stars 196 forks source link

TypeError: __init__() got an unexpected keyword argument 'chunk_size' #217

Open Kumari1302 opened 3 years ago

Kumari1302 commented 3 years ago

I'm trying to run the training on FB15k dataset and I encountered this error. It would be great help if anyone could tell me what is going wrong here. Command:

!DGLBACKEND=pytorch dglke_train --model_name TransE_l2 --dataset FB15k --batch_size 1000 \
--neg_sample_size 200 --hidden_dim 400 --gamma 19.9 --lr 0.25 --max_step 500 --log_interval 100 \
--batch_size_eval 16 -adv --regularization_coef 1.00E-09 --test --num_thread 1 --num_proc 8

Error:

Traceback (most recent call last):
  File "/home/ec2-user/anaconda3/envs/pytorch_p36/bin/dglke_train", line 8, in <module>
    sys.exit(main())
  File "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/dglke/train.py", line 125, in main
    rank=i)
  File "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/dglke/dataloader/sampler.py", line 388, in create_sampler
    return_false_neg=False)
TypeError: __init__() got an unexpected keyword argument 'chunk_size'

I'm using following versions: pytorch 1.8.0 CUDA 10.2 dgl 0.4 dglke 0.1.0

classicsong commented 3 years ago

How did you install dglke? BTW, dglke may not work with Pytorch 1.8.0. Pytorch 1.7.0 is OK

Kumari1302 commented 3 years ago

How did you install dglke? BTW, dglke may not work with Pytorch 1.8.0. Pytorch 1.7.0 is OK

I installed dglke from pip. Following is the command that I used:

pip install dglke

And I installed dgl from conda because installing from pip was throwing error. Following is the command I used:

conda install -c dglteam dgl-cuda10.1
classicsong commented 3 years ago

Can you install dgl-cuda10.1==0.4.3post2?

liuhuanyong commented 2 years ago

it works with dgl==0.4.3