From bcafa8ecb2deabd768aae48dc3d7db66d3c53f8a Mon Sep 17 00:00:00 2001 From: prbzrg <79970151+prbzrg@users.noreply.github.com> Date: Sun, 19 Apr 2026 12:29:00 +0000 Subject: [PATCH] Format .jl files --- src/exts/mlj_ext/core.jl | 2 +- src/exts/mlj_ext/core_cond_icnf.jl | 2 +- src/exts/mlj_ext/core_icnf.jl | 2 +- test/ci_tests/smoke_tests.jl | 1 + test/ci_tests/speed_tests.jl | 1 + test/runtests.jl | 4 ++-- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/exts/mlj_ext/core.jl b/src/exts/mlj_ext/core.jl index 1166bcdc..b4aee4fc 100644 --- a/src/exts/mlj_ext/core.jl +++ b/src/exts/mlj_ext/core.jl @@ -74,7 +74,7 @@ function get_logp˂x( st::NamedTuple, ) where {T <: AbstractFloat, INPLACE} @warn "to compute by vectors, data should be a vector." maxlog = 1 - broadcast( + return broadcast( function (x::AbstractVector{<:Real}, y::AbstractVector{<:Real}) return first(inference(icnf, TestMode(), x, y, ps, st)) end, diff --git a/src/exts/mlj_ext/core_cond_icnf.jl b/src/exts/mlj_ext/core_cond_icnf.jl index ce46e004..83b0633c 100644 --- a/src/exts/mlj_ext/core_cond_icnf.jl +++ b/src/exts/mlj_ext/core_cond_icnf.jl @@ -20,7 +20,7 @@ function CondICNFModel(; Optimisers.WeightDecay(; lambda = convert(eltype(icnf), 1.0e-2)), Optimisers.Adam(; eta = convert(eltype(icnf), 1.0e-3), - beta = (convert(eltype(icnf), 9e-1), convert(eltype(icnf), 9.99e-1)), + beta = (convert(eltype(icnf), 9.0e-1), convert(eltype(icnf), 9.99e-1)), epsilon = eps(eltype(icnf)), ), ), diff --git a/src/exts/mlj_ext/core_icnf.jl b/src/exts/mlj_ext/core_icnf.jl index 8f12972d..45c35002 100644 --- a/src/exts/mlj_ext/core_icnf.jl +++ b/src/exts/mlj_ext/core_icnf.jl @@ -20,7 +20,7 @@ function ICNFModel(; Optimisers.WeightDecay(; lambda = convert(eltype(icnf), 1.0e-2)), Optimisers.Adam(; eta = convert(eltype(icnf), 1.0e-3), - beta = (convert(eltype(icnf), 9e-1), convert(eltype(icnf), 9.99e-1)), + beta = (convert(eltype(icnf), 9.0e-1), convert(eltype(icnf), 9.99e-1)), epsilon = eps(eltype(icnf)), ), ), diff --git a/test/ci_tests/smoke_tests.jl b/test/ci_tests/smoke_tests.jl index a40f2ac7..d0dd2e7c 100644 --- a/test/ci_tests/smoke_tests.jl +++ b/test/ci_tests/smoke_tests.jl @@ -124,6 +124,7 @@ Test.@testset verbose = true showtiming = true failfast = false "Smoke Tests" be Test.@testset verbose = true showtiming = true failfast = false "$adtype on loss" for adtype in adtypes + Test.@test !isnothing(DifferentiationInterface.gradient(diff_loss, adtype, ps)) Test.@test !isnothing(DifferentiationInterface.gradient(diff2_loss, adtype, r)) diff --git a/test/ci_tests/speed_tests.jl b/test/ci_tests/speed_tests.jl index 2c9cb153..43ddcd94 100644 --- a/test/ci_tests/speed_tests.jl +++ b/test/ci_tests/speed_tests.jl @@ -1,6 +1,7 @@ Test.@testset verbose = true showtiming = true failfast = false "Speed Tests" begin Test.@testset verbose = true showtiming = true failfast = false "$compute_mode" for compute_mode in compute_modes + @show compute_mode ndata = 2^10 diff --git a/test/runtests.jl b/test/runtests.jl index a56db945..faefe07e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -42,7 +42,7 @@ devices = MLDataDevices.AbstractDevice[MLDataDevices.cpu_device()] adtypes = ADTypes.AbstractADType[] compute_modes = ContinuousNormalizingFlows.ComputeMode[] if VIA_ZYGOTE - adtypes = append!(adtypes, ADTypes.AbstractADType[ADTypes.AutoZygote(),]) + adtypes = append!(adtypes, ADTypes.AbstractADType[ADTypes.AutoZygote()]) compute_modes = append!( compute_modes, ContinuousNormalizingFlows.ComputeMode[ @@ -53,7 +53,7 @@ if VIA_ZYGOTE ) end if VIA_FORWARDDIFF - adtypes = append!(adtypes, ADTypes.AbstractADType[ADTypes.AutoForwardDiff(),]) + adtypes = append!(adtypes, ADTypes.AbstractADType[ADTypes.AutoForwardDiff()]) compute_modes = append!( compute_modes, ContinuousNormalizingFlows.ComputeMode[