From 66da27e31f9012538d3675f32af03ff542d0e377 Mon Sep 17 00:00:00 2001 From: aurorarossi Date: Tue, 13 Dec 2022 11:18:51 +0100 Subject: [PATCH 1/3] Remove `rand_graphs` in test --- test/GNNGraphs/query.jl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/GNNGraphs/query.jl b/test/GNNGraphs/query.jl index dcd4bcd3c..9b70ba2db 100644 --- a/test/GNNGraphs/query.jl +++ b/test/GNNGraphs/query.jl @@ -137,12 +137,10 @@ t = [2, 3, 4, 5, 1, 5, 1, 2, 3, 4] g = GNNGraph(s,t) @test laplacian_lambda_max(g) ≈ Float32(1.809017) - data1 = [g for i in 1:5] - gall1 = Flux.batch(data1) - @test laplacian_lambda_max(gall1) ≈ [Float32(1.809017) for i in 1:5] - data2 = [rand_graph(10,20) for i in 1:3] - gall2 = Flux.batch(data2) - @test length(laplacian_lambda_max(gall2)) == 3 + data = [g for i in 1:5] + gall = Flux.batch(data) + @test laplacian_lambda_max(gall) ≈ [Float32(1.809017) for i in 1:5] + @test length(laplacian_lambda_max(gall)) == 5 end @testset "adjacency_matrix" begin From 9d43be27df1f1af0dc69a489926ec883f60dc292 Mon Sep 17 00:00:00 2001 From: aurorarossi Date: Tue, 13 Dec 2022 12:21:58 +0100 Subject: [PATCH 2/3] Add back `rand_graph` with seed --- test/GNNGraphs/query.jl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/GNNGraphs/query.jl b/test/GNNGraphs/query.jl index 9b70ba2db..bc0805cf0 100644 --- a/test/GNNGraphs/query.jl +++ b/test/GNNGraphs/query.jl @@ -135,12 +135,14 @@ @testset "laplacian_lambda_max" begin s = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] t = [2, 3, 4, 5, 1, 5, 1, 2, 3, 4] - g = GNNGraph(s,t) + g = GNNGraph(s, t) @test laplacian_lambda_max(g) ≈ Float32(1.809017) - data = [g for i in 1:5] - gall = Flux.batch(data) - @test laplacian_lambda_max(gall) ≈ [Float32(1.809017) for i in 1:5] - @test length(laplacian_lambda_max(gall)) == 5 + data1 = [g for i in 1:5] + gall1 = Flux.batch(data1) + @test laplacian_lambda_max(gall1) ≈ [Float32(1.809017) for i in 1:5] + data2 = [rand_graph(10, 20; seed=i) for i in 1:3] + gall2 = Flux.batch(data2) + @test length(laplacian_lambda_max(gall2)) == 3 end @testset "adjacency_matrix" begin From 55fd2b42ad9c14c419d2f6581e43b22ddcf5fb99 Mon Sep 17 00:00:00 2001 From: aurorarossi Date: Tue, 13 Dec 2022 12:51:52 +0100 Subject: [PATCH 3/3] Revert "Add back `rand_graph` with seed" This reverts commit 9d43be27df1f1af0dc69a489926ec883f60dc292. --- test/GNNGraphs/query.jl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/GNNGraphs/query.jl b/test/GNNGraphs/query.jl index bc0805cf0..9b70ba2db 100644 --- a/test/GNNGraphs/query.jl +++ b/test/GNNGraphs/query.jl @@ -135,14 +135,12 @@ @testset "laplacian_lambda_max" begin s = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] t = [2, 3, 4, 5, 1, 5, 1, 2, 3, 4] - g = GNNGraph(s, t) + g = GNNGraph(s,t) @test laplacian_lambda_max(g) ≈ Float32(1.809017) - data1 = [g for i in 1:5] - gall1 = Flux.batch(data1) - @test laplacian_lambda_max(gall1) ≈ [Float32(1.809017) for i in 1:5] - data2 = [rand_graph(10, 20; seed=i) for i in 1:3] - gall2 = Flux.batch(data2) - @test length(laplacian_lambda_max(gall2)) == 3 + data = [g for i in 1:5] + gall = Flux.batch(data) + @test laplacian_lambda_max(gall) ≈ [Float32(1.809017) for i in 1:5] + @test length(laplacian_lambda_max(gall)) == 5 end @testset "adjacency_matrix" begin