Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neither dglke_emb_sim nor dglke_predict are appearing in pip3 installed version of dglke #139

Closed
AlexMRuch opened this issue Aug 20, 2020 · 7 comments

Comments

@AlexMRuch
Copy link

AlexMRuch commented Aug 20, 2020

Neither dglke_emb_sim nor dglke_predict are appearing in the pip3 installed version of dglke, even after I try installing in a new environment and after I uninstall all older versions of dglke. Are these methods only available through the github version? If so, when will these additions be pushed to pip3?

(dglke) amruch@wit:~/Projects/AmazonScience/graphs$ sudo pip3 install dglke
The directory '/home/amruch/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/amruch/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions andowner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting dglke
  Downloading https://files.pythonhosted.org/packages/9a/59/d9571eac71ef5e63784bbf4efa75bbe6803653e04057b774ce043a1b65e3/dglke-0.1.0-py3-none-any.whl (59kB)
    100% |████████████████████████████████| 61kB 885kB/s
Requirement already satisfied: setuptools in /home/amruch/.local/lib/python3.6/site-packages (from dglke)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from dglke)
Installing collected packages: dglke
Successfully installed dglke-0.1.0
(dglke) amruch@wit:~/Projects/AmazonScience/graphs$ dglke_
dglke_client      dglke_convert     dglke_dist_train  dglke_eval        dglke_partition   dglke_server      dglke_train
@zheng-da
Copy link
Contributor

sorry, please give us a day or so. we updated the doc but didn't get time to update the pip package. we'll update the pip package this week.

@GYFgaoyuefei
Copy link

I get the following error when I run the example FB15k?

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
root@iZwz9j4e8ncj9g62rhk5e3Z:~# 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
Using backend: pytorch
Logs are being recorded at: ckpts/TransE_l2_FB15k_1/train.log
File not found. Downloading from https://data.dgl.ai/dataset/FB15k.zip
Download finished. Unzipping the file...
Unzip finished.
Reading train triples....
Finished. Read 483142 train triples.
Reading valid triples....
Finished. Read 50000 valid triples.
Reading test triples....
Finished. Read 59071 test triples.
|Train|: 483142
random partition 483142 edges into 8 parts
part 0 has 60393 edges
part 1 has 60393 edges
part 2 has 60393 edges
part 3 has 60393 edges
part 4 has 60393 edges
part 5 has 60393 edges
part 6 has 60393 edges
part 7 has 60391 edges
/usr/local/lib/python3.6/dist-packages/dgl/base.py:45: DGLWarning: Recommend creating graphs by dgl.graph(data) instead of dgl.DGLGraph(data).
return warnings.warn(message, category=category, stacklevel=1)
/usr/local/lib/python3.6/dist-packages/dgl/base.py:45: DGLWarning: Keyword arguments ['readonly', 'multigraph', 'sort_csr'] are deprecated in v0.5, and can be safely removed in all cases.
return warnings.warn(message, category=category, stacklevel=1)
Traceback (most recent call last):
File "/usr/local/bin/dglke_train", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/dglke/train.py", line 131, in main
rank=i)
File "/usr/local/lib/python3.6/dist-packages/dglke/dataloader/sampler.py", line 368, in create_sampler
return_false_neg=False)
File "/usr/local/lib/python3.6/dist-packages/dgl/contrib/sampling/sampler.py", line 695, in init
self._chunk_size)
File "/usr/local/lib/python3.6/dist-packages/dgl/_ffi/_ctypes/function.py", line 190, in call
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
File "/usr/local/lib/python3.6/dist-packages/dgl/_ffi/base.py", line 62, in check_call
raise DGLError(py_str(_LIB.DGLGetLastError()))
dgl._ffi.base.DGLError: [22:09:10] /opt/dgl/include/dgl/packed_func_ext.h:117: Check failed: ObjectTypeChecker::Check(sptr.get()): Expected type graph.Graph but get graph.HeteroGraph
Stack trace:
[bt] (0) /usr/local/lib/python3.6/dist-packages/dgl/libdgl.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x22) [0x7f5bc6fb8212]
[bt] (1) /usr/local/lib/python3.6/dist-packages/dgl/libdgl.so(dgl::GraphRef dgl::runtime::DGLArgValue::AsObjectRefdgl::GraphRef() const+0x38c) [0x7f5bc71053ac]
[bt] (2) /usr/local/lib/python3.6/dist-packages/dgl/libdgl.so(+0x9a99de) [0x7f5bc776b9de]
[bt] (3) /usr/local/lib/python3.6/dist-packages/dgl/libdgl.so(DGLFuncCall+0x52) [0x7f5bc76b2ad2]
[bt] (4) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7f5c17ec2dae]
[bt] (5) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x22f) [0x7f5c17ec271f]
[bt] (6) /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(_ctypes_callproc+0x2b4) [0x7f5c180d65c4]
[bt] (7) /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(+0x11c33) [0x7f5c180d6c33]
[bt] (8) /usr/bin/python3(_PyObject_FastCallKeywords+0x19c) [0x5a9cbc]

@AlexMRuch
Copy link
Author

AlexMRuch commented Aug 24, 2020

@GYFgaoyuefei, this issue does not seem related to link prediction or node similarity. Can you confirm that? If your issue is related to something else, please open a new issue. Also, I'm sure the developers would find it useful if you included which operating system you're using, as well as which version of dgl-ke and dgl you are using. If you could please put your output in block-comments to help us read the error trace. Lastly, did you install dgl-ke and dgl for this pipeline in it's own environment? Thanks!

@GYFgaoyuefei
Copy link

Sorry, let me open a new question

@classicsong
Copy link
Contributor

Sorry, let me open a new question

You should use dgl 0.4.3. DGL-KE is not compatable with DGL 0.5

@classicsong
Copy link
Contributor

@AlexMRuch You can try the pip now.

@AlexMRuch
Copy link
Author

AlexMRuch commented Aug 27, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants