From 2cac68478f8b701e2394c61e6e1f346a9983d47d Mon Sep 17 00:00:00 2001 From: Carlo Lucibello Date: Fri, 11 Oct 2024 07:55:46 +0200 Subject: [PATCH] drop julia v1.9 --- .github/workflows/ci.yml | 2 +- Project.toml | 2 +- test/layers/normalisation.jl | 2 +- test/runtests.jl | 8 -------- test/train.jl | 4 ++-- test/utils.jl | 6 +++--- 6 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da0f052b8b..51d5407c25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: version: - - '1.9' # Replace this with the minimum Julia version that your package supports. + - '1.10' # Replace this with the minimum Julia version that your package supports. - '1' os: [ubuntu-latest] arch: [x64] diff --git a/Project.toml b/Project.toml index 49869e3bb1..a1fbf82afd 100644 --- a/Project.toml +++ b/Project.toml @@ -65,4 +65,4 @@ SpecialFunctions = "2.1.2" Statistics = "1" Zygote = "0.6.67" cuDNN = "1" -julia = "1.9" +julia = "1.10" diff --git a/test/layers/normalisation.jl b/test/layers/normalisation.jl index 6c1b78919f..be7c5dec92 100644 --- a/test/layers/normalisation.jl +++ b/test/layers/normalisation.jl @@ -446,7 +446,7 @@ end @test Zygote.hessian_reverse(sum∘m1, [1.0,2.0,3.0]) == zeros(3, 3) m2 = Chain(BatchNorm(3), sum) - @test_broken Zygote.hessian_reverse(m2, Float32[1 2; 3 4; 5 6]) == zeros(Float32, 6, 6) + @test Zygote.hessian_reverse(m2, Float32[1 2; 3 4; 5 6]) == zeros(Float32, 6, 6) broken = VERSION >= v"1.11" end @testset "ForwardDiff" begin diff --git a/test/runtests.jl b/test/runtests.jl index 14840bead4..ef3d67f4d7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -65,14 +65,6 @@ Random.seed!(0) @testset "functors" begin include("functors.jl") end - - @static if VERSION == v"1.9" - using Documenter - @testset "Docs" begin - DocMeta.setdocmeta!(Flux, :DocTestSetup, :(using Flux); recursive=true) - doctest(Flux) - end - end else @info "Skipping CPU tests." end diff --git a/test/train.jl b/test/train.jl index b03a7d4001..f4609a9fff 100644 --- a/test/train.jl +++ b/test/train.jl @@ -148,7 +148,7 @@ end model.bias .= 0 pen2(x::AbstractArray) = sum(abs2, x)/2 opt = Flux.setup(Adam(0.1), model) - @test_broken begin + @test begin trainfn!(model, data, opt) do m, x, y err = Flux.mse(m(x), y) l2 = sum(pen2, Flux.params(m)) @@ -157,7 +157,7 @@ end diff2 = model.weight .- init_weight @test diff1 ≈ diff2 true - end + end broken = VERSION >= v"1.11" end # Take 3: using WeightDecay instead. Need the /2 above, to match exactly. diff --git a/test/utils.jl b/test/utils.jl index 8f37bedfea..b526b63286 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -273,13 +273,13 @@ end @testset "params gradient" begin m = (x=[1,2.0], y=[3.0]); - @test_broken begin - # Explicit -- was broken by #2054 / then fixed / now broken again on julia v0.11 + @test begin + # Explicit -- was broken by #2054 / then fixed / now broken again on julia v1.11 gnew = gradient(m -> (sum(norm, Flux.params(m))), m)[1] @test gnew.x ≈ [0.4472135954999579, 0.8944271909999159] @test gnew.y ≈ [1.0] true - end + end broken = VERSION >= v"1.11" # Implicit gold = gradient(() -> (sum(norm, Flux.params(m))), Flux.params(m))