Skip to content

Commit

Permalink
no constraints on numbers of features gdata for heterographs (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello authored Dec 25, 2024
1 parent c1ceded commit 5a8172c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion GNNGraphs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GNNGraphs"
uuid = "aed8fd31-079b-4b5a-b342-a13352159b8c"
authors = ["Carlo Lucibello and contributors"]
version = "1.4.0"
version = "1.4.1"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
3 changes: 2 additions & 1 deletion GNNGraphs/src/gnnheterograph/gnnheterograph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ function GNNHeteroGraph(data::EDict;
ndata = normalize_heterographdata(ndata, default_name = :x, ns = num_nodes)
edata = normalize_heterographdata(edata, default_name = :e, ns = num_edges,
duplicate_if_needed = true)
gdata = normalize_graphdata(gdata, default_name = :u, n = num_graphs)
gdata = normalize_graphdata(gdata, default_name = :u,
n = num_graphs > 1 ? num_graphs : -1)
end

return GNNHeteroGraph(graph,
Expand Down
2 changes: 1 addition & 1 deletion GNNGraphs/test/gnnheterograph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ end
@test hg.ndata isa Dict{Symbol, DataStore}
@test hg.edata isa Dict{Tuple{Symbol, Symbol, Symbol}, DataStore}
@test isempty(hg.gdata)
@test hg.gdata._n == -1 # no constraints on gdata
@test sort(hg.ntypes) == [:A, :B]
@test sort(hg.etypes) == [(:A, :rel1, :B), (:B, :rel2, :A)]

end

@testset "features" begin
Expand Down

2 comments on commit 5a8172c

@CarloLucibello
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=GNNGraphs

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/122001

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a GNNGraphs-v1.4.1 -m "<description of version>" 5a8172cb7ecb52e8977ad1e6fa9b564743dae9e3
git push origin GNNGraphs-v1.4.1

Please sign in to comment.