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

graph.HeteroGraph Error happened when running example #273

Open
Vremold opened this issue Mar 15, 2023 · 1 comment
Open

graph.HeteroGraph Error happened when running example #273

Vremold opened this issue Mar 15, 2023 · 1 comment

Comments

@Vremold
Copy link

Vremold commented Mar 15, 2023

Recently, I run the example provided with the following command:

dglke_train

By default, it will use FB15k knowledge graph. However, it seems to construct a graph.HeteroGraph which is not suitable for dgl. Here is the error message:

/somevenv/lib/python3.7/site-packages/dgl/heterograph.py:72: DGLWarning: Recommend creating graphs by `dgl.graph(data)` instead of `dgl.DGLGraph(data)`.
  dgl_warning('Recommend creating graphs by `dgl.graph(data)`'
/somevenv/lib/python3.7/site-packages/dgl/heterograph.py:84: DGLWarning: Keyword arguments ['readonly', 'multigraph', 'sort_csr'] are deprecated in v0.5, and can be safely removed in all cases.
  ' removed in all cases.'.format(list(deprecate_kwargs.keys())))
Traceback (most recent call last):
  File "/somevenv/bin/dglke_train", line 8, in <module>
    sys.exit(main())
  File "/somevenv/lib/python3.7/site-packages/dglke/train.py", line 150, in main
    exclude_positive=False)
  File "/somevenv/lib/python3.7/site-packages/dglke/dataloader/sampler.py", line 388, in create_sampler
    return_false_neg=False)
  File "/somevenv/lib/python3.7/site-packages/dgl/contrib/sampling/sampler.py", line 695, in __init__
    self._chunk_size)
  File "dgl/_ffi/_cython/./function.pxi", line 293, in dgl._ffi._cy3.core.FunctionBase.__call__
  File "dgl/_ffi/_cython/./function.pxi", line 239, in dgl._ffi._cy3.core.FuncCall
dgl._ffi.base.DGLError: [17:32:19] /opt/dgl/include/dgl/packed_func_ext.h:117: Check failed: ObjectTypeChecker<TObjectRef>::Check(sptr.get()): Expected type graph.Graph but get graph.HeteroGraph
Stack trace:

How to solve it?

@ArtificialZeng
Copy link

how??

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

2 participants