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

Expected type graph.Graph but get graph.HeteroGraph #211

Closed xing969541 closed 3 years ago

xing969541 commented 3 years ago

Hello, I trying to train dglke according to the examples:

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

and get following error:

Traceback (most recent call last): File "c:\programdata\anaconda3\envs\dgl\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\programdata\anaconda3\envs\dgl\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\envs\dgl\Scripts\dglke_train.exe__main.py", line 7, in File "c:\programdata\anaconda3\envs\dgl\lib\site-packages\dglke\train.py", line 125, in main rank=i) File "c:\programdata\anaconda3\envs\dgl\lib\site-packages\dglke\dataloader\sampler.py", line 389, in create_sampler return_false_neg=False) File "c:\programdata\anaconda3\envs\dgl\lib\site-packages\dgl\contrib\sampling\sampler.py", line 694, in init self._chunk_size) File "c:\programdata\anaconda3\envs\dgl\lib\site-packages\dgl_ffi_ctypes\function.py", line 190, in call__ ctypes.byref(ret_val), ctypes.byref(ret_tcode))) File "c:\programdata\anaconda3\envs\dgl\lib\site-packages\dgl_ffi\base.py", line 64, in check_call raise DGLError(py_str(_LIB.DGLGetLastError())) dgl._ffi.base.DGLError: [10:33:11] C:\Users\Administrator\dgl-0.5\include\dgl/packed_func_ext.h:117: Check failed: ObjectTypeChecker::Check(sptr.get()): Expected type graph.Graph but get graph.HeteroGraph

It's running on python 3.6, windows10. Relevant package versions:

-dgl==0.6.0post1 -dglke==0.1.2 -pytorch==1.8.0

Thanks for any help!

JiaquanYe commented 3 years ago

I have got the same error, too...

zheng-da commented 3 years ago

DGL-KE works with DGL 0.4

JonnyTran commented 3 years ago

DGL-KE works with DGL 0.4

Is there a way to add support for DGLHeteroGraph in dglke? Please consider, as it is an important feature.

classicsong commented 3 years ago

We are going to update DGL-KE to work with DGL 0.7. Then DGLHeteroGraph will be supported.

liuhuanyong commented 2 years ago

DGL-KE works with DGL 0.4

TypeError: init() got an unexpected keyword argument 'chunk_size'