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

Info about features in the compact show #169

Closed
CarloLucibello opened this issue May 22, 2022 · 3 comments
Closed

Info about features in the compact show #169

CarloLucibello opened this issue May 22, 2022 · 3 comments
Labels
good first issue Good for newcomers

Comments

@CarloLucibello
Copy link
Member

CarloLucibello commented May 22, 2022

Right now features' information is discarded when compact printing (when printing a vector of graphs):

julia> [rand_graph(10, 20, ndata=rand(2, 10)) for i=1:5]
5-element Vector{GNNGraph{Tuple{Vector{Int64}, Vector{Int64}, Nothing}}}:
 GNNGraph(10, 20)
 GNNGraph(10, 20)
 GNNGraph(10, 20)
 GNNGraph(10, 20)
 GNNGraph(10, 20)

We could print instead at least the size of the arrays.

@CarloLucibello CarloLucibello changed the title Info about features data in the compact show Info about features in the compact show May 22, 2022
@CarloLucibello CarloLucibello added the good first issue Good for newcomers label Nov 23, 2022
@aurorarossi
Copy link
Member

What do you think about something like the following?

julia> [rand_graph(10,20,ndata=rand(5,10),edata=rand(2,20),gdata=rand(1,1)) for i in 1:5]
5-element Vector{GNNGraph{Tuple{Vector{Int64}, Vector{Int64}, Nothing}}}:
 GNNGraph(10, 20) x: 5×10 e: 2×20 u: 1×1
 GNNGraph(10, 20) x: 5×10 e: 2×20 u: 1×1
 GNNGraph(10, 20) x: 5×10 e: 2×20 u: 1×1
 GNNGraph(10, 20) x: 5×10 e: 2×20 u: 1×1
 GNNGraph(10, 20) x: 5×10 e: 2×20 u: 1×1

where x,e,u are the default names of ndata, edata and gdata, respectively.

@CarloLucibello
Copy link
Member Author

CarloLucibello commented Nov 24, 2022

Seems reasonable. What do we do when multiple tensors are present? What do you think about this:

julia> [
  rand_graph(10,20),
  rand_graph(10,20, ndata=rand(5,10)),
  rand_graph(10,20, ndata=(a=rand(5,10),)],
  rand_graph(10,20, ndata=rand(5,10), edata=rand(2,20)),
  rand_graph(10,20, ndata=rand(5,10), gdata=rand(1,1)),  
  rand_graph(10,20, ndata=rand(5,10), edata=rand(2,20), gdata=rand(1,1)),
  rand_graph(10,20, ndata=(a=rand(5,10), b=rand(3,10)), edata=rand(2,20)]
...
GNNGraph(10, 20) with no data
GNNGraph(10, 20) with x: 5×10 data
GNNGraph(10, 20) with a: 5×10 data
GNNGraph(10, 20) with x: 5×10, e: 2×20 data
GNNGraph(10, 20) with x: 5×10, , u: 1×1 data
GNNGraph(10, 20) with x: 5×10, e: 2×20, u: 1×1 data
GNNGraph(10, 20) with (a: 5×10, b: 3×10), e: 2×20 data

@CarloLucibello
Copy link
Member Author

closed by #234

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

No branches or pull requests

2 participants