LsqFit.jl
LsqFit.jl copied to clipboard
Test for levenberg_marquardt.jl fails via DiffEqDiffTools not defined
I just installed the latest version of this package under Julia v1.3.1, and ran the test. Then, one of the three tests failed as follows (even after I explicitly added the package FiniteDiff.jl). Thanks for your help!!
(v1.3) pkg> test LsqFit
Testing LsqFit
Resolving package versions...
Status `/var/folders/rh/tyftw3w11t98lcx401d93v0h0000gn/T/jl_AQ8XCa/Manifest.toml`
[7d9fca2a] Arpack v0.4.0
[68821587] Arpack_jll v3.5.0+2
[4fba245c] ArrayInterface v2.3.1
[b99e7846] BinaryProvider v0.5.8
[bbf7d656] CommonSubexpressions v0.2.0
[34da2185] Compat v2.2.0
[9a962f9c] DataAPI v1.1.0
[864edb3b] DataStructures v0.17.9
[163ba53b] DiffResults v1.0.2
[b552c78f] DiffRules v1.0.0
[31c24e10] Distributions v0.22.4
[1a297f60] FillArrays v0.8.4
[6a86dc24] FiniteDiff v2.1.0
[f6369f11] ForwardDiff v0.10.9
[2fda8390] LsqFit v0.10.0
[e1d29d7a] Missings v0.4.3
[d41bc354] NLSolversBase v7.6.1
[77ba4419] NaNMath v0.3.3
[4536629a] OpenBLAS_jll v0.3.7+5
[efe28fd5] OpenSpecFun_jll v0.5.3+1
[87e2bd06] OptimBase v2.0.0
[bac558e1] OrderedCollections v1.1.0
[90014a1f] PDMats v0.9.11
[1fd47b50] QuadGK v2.3.1
[189a3867] Reexport v0.2.0
[ae029012] Requires v0.5.2
[79098fc4] Rmath v0.6.0
[a2af1166] SortingAlgorithms v0.3.1
[276daf66] SpecialFunctions v0.9.0
[90137ffa] StaticArrays v0.12.1
[2913bbd2] StatsBase v0.32.0
[4c63d2b9] StatsFuns v0.9.3
[2a0f44e3] Base64 [`@stdlib/Base64`]
[ade2ca70] Dates [`@stdlib/Dates`]
[8bb1440f] DelimitedFiles [`@stdlib/DelimitedFiles`]
[8ba89e20] Distributed [`@stdlib/Distributed`]
[b77e0a4c] InteractiveUtils [`@stdlib/InteractiveUtils`]
[76f85450] LibGit2 [`@stdlib/LibGit2`]
[8f399da3] Libdl [`@stdlib/Libdl`]
[37e2e46d] LinearAlgebra [`@stdlib/LinearAlgebra`]
[56ddb016] Logging [`@stdlib/Logging`]
[d6f4376e] Markdown [`@stdlib/Markdown`]
[a63ad114] Mmap [`@stdlib/Mmap`]
[44cfe95a] Pkg [`@stdlib/Pkg`]
[de0858da] Printf [`@stdlib/Printf`]
[3fa0cd96] REPL [`@stdlib/REPL`]
[9a3f8284] Random [`@stdlib/Random`]
[ea8e919c] SHA [`@stdlib/SHA`]
[9e88b42a] Serialization [`@stdlib/Serialization`]
[1a1011a3] SharedArrays [`@stdlib/SharedArrays`]
[6462fe0b] Sockets [`@stdlib/Sockets`]
[2f01184e] SparseArrays [`@stdlib/SparseArrays`]
[10745b16] Statistics [`@stdlib/Statistics`]
[4607b0f0] SuiteSparse [`@stdlib/SuiteSparse`]
[8dfed614] Test [`@stdlib/Test`]
[cf7118a7] UUIDs [`@stdlib/UUIDs`]
[4ec0a83e] Unicode [`@stdlib/Unicode`]
Running tests:
* curve_fit.jl
norm(fit.param - [1.0, 2.0]) < 0.05 ? 0.0008874557337320814
norm(errors - [0.017, 0.075]) < 0.1 ?0.07271313875913402
norm(fit.param - [1.0, 2.0]) < 0.05 ? 0.0008874557336550121
* levenberg_marquardt.jl
optimization: Error During Test at /Users/xxx/.julia/packages/LsqFit/NjkFI/test/levenberg_marquardt.jl:1
Got exception outside of a @test
UndefVarError: DiffEqDiffTools not defined
Stacktrace:
[1] getproperty at ./Base.jl:13 [inlined]
[2] (::var"#6#15"{var"#5#14"{var"#model#13",StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}})(::Array{Float64,1}) at /Users/xxx/.julia/packages/LsqFit/NjkFI/test/levenberg_marquardt.jl:58
[3] (::NLSolversBase.var"#jj!#3"{var"#6#15"{var"#5#14"{var"#model#13",StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}}})(::Array{Float64,2}, ::Array{Float64,1}) at /Users/xxx/.julia/packages/NLSolversBase/mGaJg/src/objective_types/inplace_factory.jl:31
[4] (::NLSolversBase.var"#fj!#7"{NLSolversBase.var"#ff!#1"{var"#5#14"{var"#model#13",StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}},NLSolversBase.var"#jj!#3"{var"#6#15"{var"#5#14"{var"#model#13",StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}}}})(::Array{Float64,1}, ::Array{Float64,2}, ::Array{Float64,1}) at /Users/xxx/.julia/packages/NLSolversBase/mGaJg/src/objective_types/abstract.jl:7
[5] value_jacobian!!(::OnceDifferentiable{Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}, ::Array{Float64,2}, ::Array{Float64,1}) at /Users/xxx/.julia/packages/NLSolversBase/mGaJg/src/interface.jl:124
[6] value_jacobian!! at /Users/xxx/.julia/packages/NLSolversBase/mGaJg/src/interface.jl:122 [inlined]
[7] #levenberg_marquardt#10(::Float64, ::Float64, ::Int64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Bool, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing, ::typeof(LsqFit.levenberg_marquardt), ::OnceDifferentiable{Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}) at /Users/xxx/.julia/packages/LsqFit/NjkFI/src/levenberg_marquardt.jl:42
[8] levenberg_marquardt(::OnceDifferentiable{Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}) at /Users/xxx/.julia/packages/LsqFit/NjkFI/src/levenberg_marquardt.jl:42
[9] top-level scope at /Users/xxx/.julia/packages/LsqFit/NjkFI/test/levenberg_marquardt.jl:61
[10] top-level scope at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
[11] top-level scope at /Users/xxx/.julia/packages/LsqFit/NjkFI/test/levenberg_marquardt.jl:2
[12] include at ./boot.jl:328 [inlined]
[13] include_relative(::Module, ::String) at ./loading.jl:1105
[14] include(::Module, ::String) at ./Base.jl:31
[15] include(::String) at ./client.jl:424
[16] top-level scope at /Users/xxx/.julia/packages/LsqFit/NjkFI/test/runtests.jl:14
[17] include at ./boot.jl:328 [inlined]
[18] include_relative(::Module, ::String) at ./loading.jl:1105
[19] include(::Module, ::String) at ./Base.jl:31
[20] include(::String) at ./client.jl:424
[21] top-level scope at none:6
[22] eval(::Module, ::Any) at ./boot.jl:330
[23] exec_options(::Base.JLOptions) at ./client.jl:263
[24] _start() at ./client.jl:460
Test Summary: | Pass Error Total
optimization | 2 1 3
ERROR: LoadError: LoadError: Some tests did not pass: 2 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /Users/xxx/.julia/packages/LsqFit/NjkFI/test/levenberg_marquardt.jl:1
in expression starting at /Users/xxx/.julia/packages/LsqFit/NjkFI/test/runtests.jl:12
ERROR: Package LsqFit errored during testing
Hi! Thanks for this report. There has been some restructuring of some of the automatic differentiation and finite difference packages lately, and I might have overlooked something here. Let me have a look.
Okay, this is just an issue in the test script, it shouldn't affect the actual code in the package. Thanks for reporting it !