Giter Site home page Giter Site logo

Two issues in set_e_repr() about dgl HOT 3 CLOSED

dmlc avatar dmlc commented on August 15, 2024
Two issues in set_e_repr()

from dgl.

Comments (3)

jermainewang avatar jermainewang commented on August 15, 2024

I think this is a corner case that we didn't cover -- setting features when column does not exist. I will fix that in a patch. The edge list order is correctly captured. Here is the result on my PC:

>>> import networkx as nx
>>> import dgl
>>> import torch
>>> G = nx.DiGraph()
>>> G.add_nodes_from([0, 1, 2])
>>> G.add_edges_from([(0, 1), (0, 2)])
>>> G.edges
OutEdgeView([(0, 1), (0, 2)])
>>> G.nodes
NodeView((0, 1, 2))
>>> DG = dgl.DGLGraph(G)
>>> DG.edges
OutEdgeView([(0, 1), (0, 2)])
>>> DG.nodes
NodeView((0, 1, 2))
>>> DG.edge_list
[(0, 1), (0, 2)]

Setting features to non-exist column could be supported by padding zero. This has already been supported by FrameRef in the new subgraph branch (see this test file. However, the Graph class does not handle it correctly at the moment. Will fix this.

from dgl.

jermainewang avatar jermainewang commented on August 15, 2024

Such fix will be included in PR #39

from dgl.

BarclayII avatar BarclayII commented on August 15, 2024

Yes, switching to subgraph branch fixes problem (1).

from dgl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.