Skip to content

Commit 5a8172c

Browse files
no constraints on numbers of features gdata for heterographs (#570)
1 parent c1ceded commit 5a8172c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

GNNGraphs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GNNGraphs"
22
uuid = "aed8fd31-079b-4b5a-b342-a13352159b8c"
33
authors = ["Carlo Lucibello and contributors"]
4-
version = "1.4.0"
4+
version = "1.4.1"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

GNNGraphs/src/gnnheterograph/gnnheterograph.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ function GNNHeteroGraph(data::EDict;
144144
ndata = normalize_heterographdata(ndata, default_name = :x, ns = num_nodes)
145145
edata = normalize_heterographdata(edata, default_name = :e, ns = num_edges,
146146
duplicate_if_needed = true)
147-
gdata = normalize_graphdata(gdata, default_name = :u, n = num_graphs)
147+
gdata = normalize_graphdata(gdata, default_name = :u,
148+
n = num_graphs > 1 ? num_graphs : -1)
148149
end
149150

150151
return GNNHeteroGraph(graph,

GNNGraphs/test/gnnheterograph.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ end
3131
@test hg.ndata isa Dict{Symbol, DataStore}
3232
@test hg.edata isa Dict{Tuple{Symbol, Symbol, Symbol}, DataStore}
3333
@test isempty(hg.gdata)
34+
@test hg.gdata._n == -1 # no constraints on gdata
3435
@test sort(hg.ntypes) == [:A, :B]
3536
@test sort(hg.etypes) == [(:A, :rel1, :B), (:B, :rel2, :A)]
36-
3737
end
3838

3939
@testset "features" begin

0 commit comments

Comments
 (0)