diff --git a/Project.toml b/Project.toml index 857355fdb..0619402be 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GraphNeuralNetworks" uuid = "cffab07f-9bc2-4db1-8861-388f63bf7694" authors = ["Carlo Lucibello and contributors"] -version = "0.3.8" +version = "0.3.9" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" @@ -46,9 +46,11 @@ julia = "1.6" Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a" FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" +InlineStrings = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" MLDatasets = "eb30cadb-4394-5ae3-aed4-317e484a6458" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [targets] -test = ["Test", "Adapt", "Zygote", "FiniteDifferences", "ChainRulesTestUtils", "MLDatasets"] +test = ["Test", "Adapt", "InlineStrings", "Zygote", "FiniteDifferences", + "ChainRulesTestUtils", "MLDatasets"] diff --git a/src/GNNGraphs/utils.jl b/src/GNNGraphs/utils.jl index 159227466..9aa9fc056 100644 --- a/src/GNNGraphs/utils.jl +++ b/src/GNNGraphs/utils.jl @@ -18,6 +18,9 @@ cat_features(x1::AbstractArray, x2::AbstractArray) = cat(x1, x2, dims=ndims(x1)) cat_features(x1::Union{Number, AbstractVector}, x2::Union{Number, AbstractVector}) = cat(x1, x2, dims=1) +# workaround for issue #98 #104 +cat_features(x1::NamedTuple{(), Tuple{}}, x2::NamedTuple{(), Tuple{}}) = (;) + function cat_features(x1::NamedTuple, x2::NamedTuple) sort(collect(keys(x1))) == sort(collect(keys(x2))) || @error "cannot concatenate feature data with different keys" diff --git a/test/runtests.jl b/test/runtests.jl index cd2ebc4ec..186ba3967 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -12,6 +12,8 @@ using Graphs using Zygote using Test using MLDatasets +using InlineStrings # not used but with the import we test #98 and #104 + CUDA.allowscalar(false) const ACUMatrix{T} = Union{CuMatrix{T}, CUDA.CUSPARSE.CuSparseMatrix{T}}