Skip to content

Commit

Permalink
reinstate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Aug 7, 2024
1 parent 7c14dd2 commit 5a92e75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/layers/conv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ l = GATConv(in_channel => out_channel, add_self_loops = false, bias = false; hea
y = l(g, x)
```
"""
struct GATConv{DX <: Dense, DE <: Union{Dense, Nothing}, DV, T, A <: AbstractMatrix, F, B} <:
GNNLayer
struct GATConv{DX<:Dense,DE<:Union{Dense, Nothing},DV,T,A<:AbstractMatrix,F,B} <: GNNLayer
dense_x::DX
dense_e::DE
bias::B
Expand All @@ -316,7 +315,7 @@ struct GATConv{DX <: Dense, DE <: Union{Dense, Nothing}, DV, T, A <: AbstractMat
end

Flux.@layer GATConv
Flux.trainable(l::GATConv) = (dense_x = l.dense_x, dense_e = l.dense_e, bias = l.bias, a = l.a)
Flux.trainable(l::GATConv) = (; l.dense_x, l.dense_e, l.bias, l.a)

GATConv(ch::Pair{Int, Int}, args...; kws...) = GATConv((ch[1], 0) => ch[2], args...; kws...)

Expand Down
5 changes: 1 addition & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@ tests = [
!CUDA.functional() && @warn("CUDA unavailable, not testing GPU support")

# @testset "GraphNeuralNetworks: graph format $graph_type" for graph_type in (:coo, :dense, :sparse)
# for graph_type in (:coo, :dense, :sparse)
for graph_type in (:dense,)
for graph_type in (:coo, :dense, :sparse)

@info "Testing graph format :$graph_type"
global GRAPH_T = graph_type
global TEST_GPU = CUDA.functional() && (GRAPH_T != :sparse)
# global GRAPH_T = :sparse
# global TEST_GPU = false

@testset "$t" for t in tests
startswith(t, "examples") && GRAPH_T == :dense && continue # not testing :dense since causes OutOfMememory on github's CI
Expand Down

0 comments on commit 5a92e75

Please sign in to comment.