Skip to content

Commit 497ad52

Browse files
authored
fix the edge index (#226)
1 parent 04a8b27 commit 497ad52

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/datasets/graphs/ogbdataset.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ function read_ogb_graph(path, metadata)
268268
graph[k] = nothing
269269
else
270270
x = v[:, (num_edge_accum + 1):(num_edge_accum + m)]
271-
graph[k] = [x; x]
271+
graph[k] = [x x]
272272
end
273273
end
274274
else
@@ -374,7 +374,7 @@ function read_ogb_graph(path, metadata)
374374
else
375375
if metadata["add_inverse_edge"]
376376
v = split_dict[key][k]
377-
split_dict[key][k] = [v; v]
377+
split_dict[key][k] = [v v]
378378
end
379379
end
380380
end

test/datasets/graphs_no_ci.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ end
198198
d.graph_data.test_mask,
199199
d.graph_data.val_mask,
200200
])) == length(d)
201+
g = d[1].graphs
202+
@test size(g.edge_data.features, 2) == g.num_edges
201203
end
202204

203205
@testset "Reddit_full" begin
@@ -376,4 +378,4 @@ end
376378
@test g.num_snapshots == 27
377379
@test g.snapshots[1] isa MLDatasets.Graph
378380
@test length(g.snapshots[1].node_data) == 102
379-
end
381+
end

0 commit comments

Comments
 (0)