Skip to content

Commit a6700c3

Browse files
changes for Flux v0.15 (#550)
1 parent 6e5296a commit a6700c3

File tree

25 files changed

+689
-713
lines changed

25 files changed

+689
-713
lines changed

GNNGraphs/Project.toml

Lines changed: 2 additions & 2 deletions
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.3.1"
4+
version = "1.4.0-DEV"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -31,7 +31,7 @@ GNNGraphsSimpleWeightedGraphsExt = "SimpleWeightedGraphs"
3131
Adapt = "4"
3232
CUDA = "5"
3333
ChainRulesCore = "1"
34-
Functors = "0.4.1, 0.5"
34+
Functors = "0.5"
3535
Graphs = "1.4"
3636
KrylovKit = "0.8"
3737
LinearAlgebra = "1"

GNNGraphs/src/GNNGraphs.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module GNNGraphs
22

33
using SparseArrays
4-
using Functors: @functor
54
import Graphs
65
using Graphs: AbstractGraph, outneighbors, inneighbors, adjacency_matrix, degree,
76
has_self_loops, is_directed, induced_subgraph, has_edge
@@ -13,7 +12,6 @@ using ChainRulesCore
1312
using LinearAlgebra, Random, Statistics
1413
import MLUtils
1514
using MLUtils: getobs, numobs, ones_like, zeros_like, chunk, batch, rand_like
16-
import Functors
1715
using MLDataDevices: get_device, cpu_device, CPUDevice
1816

1917
include("chainrules.jl") # hacks for differentiability

GNNGraphs/src/datastore.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ struct DataStore
7070
end
7171
end
7272

73-
@functor DataStore
74-
7573
DataStore(data) = DataStore(-1, data)
7674
DataStore(n::Int, data::NamedTuple) = DataStore(n, Dict{Symbol, Any}(pairs(data)))
7775
DataStore(n::Int, data) = DataStore(n, Dict{Symbol, Any}(data))

GNNGraphs/src/gnngraph.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ struct GNNGraph{T <: Union{COO_T, ADJMAT_T}} <: AbstractGNNGraph{T}
116116
gdata::DataStore
117117
end
118118

119-
@functor GNNGraph
120-
121119
function GNNGraph(data::D;
122120
num_nodes = nothing,
123121
graph_indicator = nothing,

GNNGraphs/src/gnnheterograph/gnnheterograph.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ struct GNNHeteroGraph{T <: Union{COO_T, ADJMAT_T}} <: AbstractGNNGraph{T}
9595
etypes::Vector{EType}
9696
end
9797

98-
@functor GNNHeteroGraph
99-
10098
GNNHeteroGraph(data; kws...) = GNNHeteroGraph(Dict(data); kws...)
10199
GNNHeteroGraph(data::Pair...; kws...) = GNNHeteroGraph(Dict(data...); kws...)
102100

GNNGraphs/src/temporalsnapshotsgnngraph.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,5 +240,3 @@ function print_feature_t(io::IO, feature)
240240
print(io, "no")
241241
end
242242
end
243-
244-
@functor TemporalSnapshotsGNNGraph

GNNGraphs/test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using CUDA, cuDNN
22
using GNNGraphs
33
using GNNGraphs: getn, getdata
4-
using Functors
4+
using Functors: Functors
55
using LinearAlgebra, Statistics, Random
66
using NNlib
77
import MLUtils

GNNLux/Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GNNLux"
22
uuid = "e8545f4d-a905-48ac-a8c4-ca114b98986d"
33
authors = ["Carlo Lucibello and contributors"]
4-
version = "0.1.1"
4+
version = "0.2.0-DEV"
55

66
[deps]
77
ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471"
@@ -17,8 +17,8 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1717

1818
[compat]
1919
ConcreteStructs = "0.2.3"
20-
GNNGraphs = "1.3"
21-
GNNlib = "0.2.3"
20+
GNNGraphs = "1.4"
21+
GNNlib = "1"
2222
Lux = "1"
2323
LuxCore = "1"
2424
NNlib = "0.9.21"

GNNLux/docs/make.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Pkg
22
Pkg.activate(@__DIR__)
3-
Pkg.develop(path=joinpath(@__DIR__, "..", "..", "GNNGraphs"))
4-
Pkg.develop(path=joinpath(@__DIR__, "..", "..", "GNNlib"))
5-
Pkg.develop(path=joinpath(@__DIR__, ".."))
3+
Pkg.develop([
4+
PackageSpec(path=joinpath(@__DIR__, "..", "..", "GNNGraphs")),
5+
PackageSpec(path=joinpath(@__DIR__, "..", "..", "GNNlib")),
6+
PackageSpec(path=joinpath(@__DIR__, "..")),
7+
])
68
Pkg.instantiate()
79

810
using Documenter

GNNLux/src/layers/conv.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ LuxCore.parameterlength(l::GatedGraphConv) = parameterlength(l.gru) + l.dims^2*l
12611261

12621262
function (l::GatedGraphConv)(g, x, ps, st)
12631263
gru = StatefulLuxLayer{true}(l.gru, ps.gru, _getstate(st, :gru))
1264-
fgru = (h, x) -> gru((x, (h,))) # make the forward compatible with Flux.GRUCell style
1264+
fgru = (x, h) -> gru((x, (h,)))[1] # make the forward compatible with Flux.GRUCell style
12651265
m = (; gru=fgru, ps.weight, l.num_layers, l.aggr, l.dims)
12661266
return GNNlib.gated_graph_conv(m, g, x), st
12671267
end

0 commit comments

Comments
 (0)