Skip to content

"New loss" tutorial, docstring fixes. #943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 27, 2025

Conversation

AstitvaAggarwal
Copy link
Contributor

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

BPINNs improvement is evident in tests, adding in tutorial made it too long imo. Will add the same for PINO in a seperate PR.

@AstitvaAggarwal
Copy link
Contributor Author

@ChrisRackauckas, lmk what you think. Hope this can help with the presentation. (the current improvement has been shown for PINNs and also highly cited BPINNs papers. It completes the BPINN model formulation). And I think Inverse problems are the main thing PINNs are currently used for.

@ChrisRackauckas
Copy link
Member

@ChrisRackauckas
Copy link
Member

Doctests fail

@AstitvaAggarwal
Copy link
Contributor Author

AstitvaAggarwal commented May 25, 2025

@ChrisRackauckas im not sure if random initializing solvers is a good idea in tests that have some kind of fixed tolerances, but im including it anyways as it shows a clear improvement. Tests should pass now. If they fail, ill let the initialization be fixed but non informative ( [-5.0, 8.0, 5.0, -7.0] for an ideal [1.5, 1, 3.0, 1] ), this would not be a problem right?

@AstitvaAggarwal
Copy link
Contributor Author

@ChrisRackauckas tests pass now, should be fine to merge.

@ChrisRackauckas
Copy link
Member

@AstitvaAggarwal
Copy link
Contributor Author

@ChrisRackauckas
Copy link
Member

It's from BPINNs:

<html>
<body>
<!--StartFragment-->
┌ Error: Hint-handler #93 for MethodError in AbstractMCMC caused an error
--
  | │   exception =
  |1-element ExceptionStack:
  | │    MethodError: no method matching parentmodule(::Int64)
  | │    The function `parentmodule` exists, but no method is defined for this combination of argument types.
  | │
  | │    Closest candidates are:
  |parentmodule(::Any, ::Any)
  | │       @ Base reflection.jl:2292
  |parentmodule(::Base.StackTraces.StackFrame)
  | │       @ Base stacktraces.jl:286
  |parentmodule(::Module)
  | │       @ Base reflection.jl:21
  |...
  | │
  | │    Stacktrace:
  | │      [1] (::AbstractMCMC.var"#93#95")(io::IOContext{IOBuffer}, exc::MethodError, argtypes::Vector{Any}, ::Vector{Any})
  | │        @ AbstractMCMC ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/AbstractMCMC/kwj9g/src/AbstractMCMC.jl:126
  | │      [2] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
  | │        @ Base ./essentials.jl:1055
  | │      [3] invokelatest(::Any, ::Any, ::Vararg{Any})
  | │        @ Base ./essentials.jl:1052
  | │      [4] show_error_hints(::IOContext{IOBuffer}, ::MethodError, ::Vector{Any}, ::Vararg{Vector{Any}})
  | │        @ Base.Experimental ./experimental.jl:321
  | │      [5] showerror(io::IO, ex::MethodError)
  | │        @ Base ./errorshow.jl:360
  | │      [6] showerror(io::IOContext{IOBuffer}, ex::MethodError, bt::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}; backtrace::Bool)
  | │        @ Base ./errorshow.jl:97
  | │      [7] showerror
  | │        @ ./errorshow.jl:95 [inlined]
  | │      [8] showvalue(io::IOContext{IOBuffer}, e::Tuple{MethodError, Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}})
  | │        @ Base.CoreLogging ./logging/ConsoleLogger.jl:56
  | │      [9] handle_message(logger::Base.CoreLogging.ConsoleLogger, level::Base.CoreLogging.LogLevel, message::Any, _module::Any, group::Any, id::Any, filepath::Any, line::Any; kwargs...)
  | │        @ Base.CoreLogging ./logging/ConsoleLogger.jl:143
  | │     [10] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{exception::Tuple{MethodError, Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}}})
  | │        @ Base ./essentials.jl:1057
  | │     [11] macro expansion
  | │        @ ./logging/logging.jl:388 [inlined]
  | │     [12] macro expansion
  | │        @ ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Documenter/iRt2s/src/utilities/utilities.jl:47 [inlined]
  | │     [13] runner(::Type{Documenter.Expanders.ExampleBlocks}, node::MarkdownAST.Node{Nothing}, page::Documenter.Page, doc::Documenter.Document)
  | │        @ Documenter ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Documenter/iRt2s/src/expander_pipeline.jl:864
  | │     [14] dispatch(::Type{Documenter.Expanders.ExpanderPipeline}, ::MarkdownAST.Node{Nothing}, ::Vararg{Any})
  | │        @ Documenter.Selectors ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Documenter/iRt2s/src/utilities/Selectors.jl:170
  | │     [15] expand(doc::Documenter.Document)
  | │        @ Documenter ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Documenter/iRt2s/src/expander_pipeline.jl:59
  | │     [16] runner(::Type{Documenter.Builder.ExpandTemplates}, doc::Documenter.Document)
  | │        @ Documenter ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Documenter/iRt2s/src/builder_pipeline.jl:224
  | │     [17] dispatch(::Type{Documenter.Builder.DocumentPipeline}, x::Documenter.Document)
  | │        @ Documenter.Selectors ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Documenter/iRt2s/src/utilities/Selectors.jl:170
  | │     [18] #88
  | │        @ ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Documenter/iRt2s/src/makedocs.jl:275 [inlined]
  | │     [19] withenv(::Documenter.var"#88#90"{Documenter.Document}, ::Pair{String, Nothing}, ::Vararg{Pair{String, Nothing}})
  | │        @ Base ./env.jl:265
  | │     [20] #87
  | │        @ ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Documenter/iRt2s/src/makedocs.jl:274 [inlined]
  | │     [21] cd(f::Documenter.var"#87#89"{Documenter.Document}, dir::String)
  | │        @ Base.Filesystem ./file.jl:112
  | │     [22] makedocs(; debug::Bool, format::Documenter.HTMLWriter.HTML, kwargs::@Kwargs{sitename::String, authors::String, modules::Vector{Module}, clean::Bool, doctest::Bool, linkcheck::Bool, warnonly::Vector{Symbol}, pages::Vector{Any}})
  | │        @ Documenter ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Documenter/iRt2s/src/makedocs.jl:273
  | │     [23] top-level scope
  | │        @ /var/lib/buildkite-agent/builds/gpuci-13/julialang/neuralpde-dot-jl/docs/make.jl:12
  | │     [24] include(fname::String)
  | │        @ Main ./sysimg.jl:38
  | │     [25] top-level scope
  | │        @ none:5
  | │     [26] eval
  | │        @ ./boot.jl:430 [inlined]
  | │     [27] exec_options(opts::Base.JLOptions)
  | │        @ Base ./client.jl:296
  | │     [28] _start()
  | │        @ Base ./client.jl:531

<!--EndFragment-->
</body>
</html>

and then yours:

<html>
<body>
<!--StartFragment-->
┌ Error: failed to run `@example` block in docs/src/tutorials/ode_parameter_estimation.md:62-65
--
  |```@example param_estim_lv
  | │ sol = solve(prob, alg, verbose = true, abstol = 1e-8, maxiters = 5000, saveat = t_)
  | │ @test sol.k.u.p≈true_p rtol=1e-2 norm=Base.Fix1(maximum, abs) # hide
  | │ ```
  | │   exception =
  | │    MethodError: objects of type Int64 are not callable
  | │    The object of type `Int64` exists, but no method is defined for this combination of argument types when trying to treat it as a callable object.
  | │    Maybe you forgot to use an operator such as *, ^, %, / etc. ?
  | │    Stacktrace:
  | │      [1] macro expansion
  | │        @ ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Zygote/zowwZ/src/compiler/interface2.jl:0 [inlined]
  | │      [2] _pullback(::Zygote.Context{false}, ::Int64, ::ComponentArrays.ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(depvar = ViewAxis(1:542, Axis(layer_1 = ViewAxis(1:30, Axis(weight = ViewAxis(1:15, ShapedAxis((15, 1))), bias = ViewAxis(16:30, Shaped1DAxis((15,))))), layer_2 = ViewAxis(31:270, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_3 = ViewAxis(271:510, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_4 = ViewAxis(511:542, Axis(weight = ViewAxis(1:30, ShapedAxis((2, 15))), bias = ViewAxis(31:32, Shaped1DAxis((2,))))))), p = ViewAxis(543:546, Shaped1DAxis((4,))))}}}, ::NeuralPDE.ODEPhi{Vector{Float64}, Float64, Lux.StatefulLuxLayer{Static.True, Lux.Chain{@NamedTuple{layer_1::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_2::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_3::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_4::Lux.Dense{typeof(identity), Int64, Int64, Nothing, Nothing, Static.True}}, Nothing}, Nothing, @NamedTuple{layer_1::@NamedTuple{}, layer_2::@NamedTuple{}, layer_3::@NamedTuple{}, layer_4::@NamedTuple{}}}})
  | │        @ Zygote ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Zygote/zowwZ/src/compiler/interface2.jl:91
  | │      [3] total_loss
  | │        @ /var/lib/buildkite-agent/builds/gpuci-13/julialang/neuralpde-dot-jl/src/ode_solve.jl:410 [inlined]
  | │      [4] _pullback(::Zygote.Context{false}, ::NeuralPDE.var"#total_loss#190"{Nothing, Int64, Int64, NeuralPDE.var"#157#160"{NeuralPDE.ODEPhi{Vector{Float64}, Float64, Lux.StatefulLuxLayer{Static.True, Lux.Chain{@NamedTuple{layer_1::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_2::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_3::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_4::Lux.Dense{typeof(identity), Int64, Int64, Nothing, Nothing, Static.True}}, Nothing}, Nothing, @NamedTuple{layer_1::@NamedTuple{}, layer_2::@NamedTuple{}, layer_3::@NamedTuple{}, layer_4::@NamedTuple{}}}}, ODEFunction{false, SciMLBase.AutoSpecialize, typeof(Main.__atexample__named__param_estim_lv.lv), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, Bool, Vector{Float64}, Bool, Vector{Float64}}, WeightedIntervalTraining{Float64}, NeuralPDE.ODEPhi{Vector{Float64}, Float64, Lux.StatefulLuxLayer{Static.True, Lux.Chain{@NamedTuple{layer_1::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_2::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_3::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_4::Lux.Dense{typeof(identity), Int64, Int64, Nothing, Nothing, Static.True}}, Nothing}, Nothing, @NamedTuple{layer_1::@NamedTuple{}, layer_2::@NamedTuple{}, layer_3::@NamedTuple{}, layer_4::@NamedTuple{}}}}, typeof(Main.__atexample__named__param_estim_lv.additional_loss), Bool, Bool, Bool, Vector{Float64}, ODEFunction{false, SciMLBase.AutoSpecialize, typeof(Main.__atexample__named__param_estim_lv.lv), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, Tuple{Float64, Float64}}, ::ComponentArrays.ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(depvar = ViewAxis(1:542, Axis(layer_1 = ViewAxis(1:30, Axis(weight = ViewAxis(1:15, ShapedAxis((15, 1))), bias = ViewAxis(16:30, Shaped1DAxis((15,))))), layer_2 = ViewAxis(31:270, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_3 = ViewAxis(271:510, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_4 = ViewAxis(511:542, Axis(weight = ViewAxis(1:30, ShapedAxis((2, 15))), bias = ViewAxis(31:32, Shaped1DAxis((2,))))))), p = ViewAxis(543:546, Shaped1DAxis((4,))))}}}, ::SciMLBase.NullParameters)
  | │        @ Zygote ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Zygote/zowwZ/src/compiler/interface2.jl:0
  | │      [5] pullback(::Function, ::Zygote.Context{false}, ::ComponentArrays.ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(depvar = ViewAxis(1:542, Axis(layer_1 = ViewAxis(1:30, Axis(weight = ViewAxis(1:15, ShapedAxis((15, 1))), bias = ViewAxis(16:30, Shaped1DAxis((15,))))), layer_2 = ViewAxis(31:270, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_3 = ViewAxis(271:510, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_4 = ViewAxis(511:542, Axis(weight = ViewAxis(1:30, ShapedAxis((2, 15))), bias = ViewAxis(31:32, Shaped1DAxis((2,))))))), p = ViewAxis(543:546, Shaped1DAxis((4,))))}}}, ::Vararg{Any})
  | │        @ Zygote ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Zygote/zowwZ/src/compiler/interface.jl:90
  | │      [6] pullback
  | │        @ ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Zygote/zowwZ/src/compiler/interface.jl:88 [inlined]
  | │      [7] gradient(::Function, ::ComponentArrays.ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(depvar = ViewAxis(1:542, Axis(layer_1 = ViewAxis(1:30, Axis(weight = ViewAxis(1:15, ShapedAxis((15, 1))), bias = ViewAxis(16:30, Shaped1DAxis((15,))))), layer_2 = ViewAxis(31:270, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_3 = ViewAxis(271:510, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_4 = ViewAxis(511:542, Axis(weight = ViewAxis(1:30, ShapedAxis((2, 15))), bias = ViewAxis(31:32, Shaped1DAxis((2,))))))), p = ViewAxis(543:546, Shaped1DAxis((4,))))}}}, ::SciMLBase.NullParameters)
  | │        @ Zygote ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/Zygote/zowwZ/src/compiler/interface.jl:147
  | │      [8] gradient
  | │        @ ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/DifferentiationInterface/zJHX8/ext/DifferentiationInterfaceZygoteExt/DifferentiationInterfaceZygoteExt.jl:123 [inlined]
  | │      [9] gradient!(f::Function, grad::ComponentArrays.ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(depvar = ViewAxis(1:542, Axis(layer_1 = ViewAxis(1:30, Axis(weight = ViewAxis(1:15, ShapedAxis((15, 1))), bias = ViewAxis(16:30, Shaped1DAxis((15,))))), layer_2 = ViewAxis(31:270, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_3 = ViewAxis(271:510, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_4 = ViewAxis(511:542, Axis(weight = ViewAxis(1:30, ShapedAxis((2, 15))), bias = ViewAxis(31:32, Shaped1DAxis((2,))))))), p = ViewAxis(543:546, Shaped1DAxis((4,))))}}}, prep::DifferentiationInterface.NoGradientPrep{Nothing}, backend::ADTypes.AutoZygote, x::ComponentArrays.ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(depvar = ViewAxis(1:542, Axis(layer_1 = ViewAxis(1:30, Axis(weight = ViewAxis(1:15, ShapedAxis((15, 1))), bias = ViewAxis(16:30, Shaped1DAxis((15,))))), layer_2 = ViewAxis(31:270, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_3 = ViewAxis(271:510, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_4 = ViewAxis(511:542, Axis(weight = ViewAxis(1:30, ShapedAxis((2, 15))), bias = ViewAxis(31:32, Shaped1DAxis((2,))))))), p = ViewAxis(543:546, Shaped1DAxis((4,))))}}}, contexts::DifferentiationInterface.Constant{SciMLBase.NullParameters})
  | │        @ DifferentiationInterfaceZygoteExt ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/DifferentiationInterface/zJHX8/ext/DifferentiationInterfaceZygoteExt/DifferentiationInterfaceZygoteExt.jl:139
  | │     [10] (::OptimizationZygoteExt.var"#grad#14"{SciMLBase.NullParameters, OptimizationFunction{true, ADTypes.AutoZygote, NeuralPDE.var"#total_loss#190"{Nothing, Int64, Int64, NeuralPDE.var"#157#160"{NeuralPDE.ODEPhi{Vector{Float64}, Float64, Lux.StatefulLuxLayer{Static.True, Lux.Chain{@NamedTuple{layer_1::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_2::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_3::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_4::Lux.Dense{typeof(identity), Int64, Int64, Nothing, Nothing, Static.True}}, Nothing}, Nothing, @NamedTuple{layer_1::@NamedTuple{}, layer_2::@NamedTuple{}, layer_3::@NamedTuple{}, layer_4::@NamedTuple{}}}}, ODEFunction{false, SciMLBase.AutoSpecialize, typeof(Main.__atexample__named__param_estim_lv.lv), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, Bool, Vector{Float64}, Bool, Vector{Float64}}, WeightedIntervalTraining{Float64}, NeuralPDE.ODEPhi{Vector{Float64}, Float64, Lux.StatefulLuxLayer{Static.True, Lux.Chain{@NamedTuple{layer_1::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_2::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_3::Lux.Dense{typeof(NNlib.σ), Int64, Int64, Nothing, Nothing, Static.True}, layer_4::Lux.Dense{typeof(identity), Int64, Int64, Nothing, Nothing, Static.True}}, Nothing}, Nothing, @NamedTuple{layer_1::@NamedTuple{}, layer_2::@NamedTuple{}, layer_3::@NamedTuple{}, layer_4::@NamedTuple{}}}}, typeof(Main.__atexample__named__param_estim_lv.additional_loss), Bool, Bool, Bool, Vector{Float64}, ODEFunction{false, SciMLBase.AutoSpecialize, typeof(Main.__atexample__named__param_estim_lv.lv), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, Tuple{Float64, Float64}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, ADTypes.AutoZygote})(res::ComponentArrays.ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(depvar = ViewAxis(1:542, Axis(layer_1 = ViewAxis(1:30, Axis(weight = ViewAxis(1:15, ShapedAxis((15, 1))), bias = ViewAxis(16:30, Shaped1DAxis((15,))))), layer_2 = ViewAxis(31:270, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_3 = ViewAxis(271:510, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_4 = ViewAxis(511:542, Axis(weight = ViewAxis(1:30, ShapedAxis((2, 15))), bias = ViewAxis(31:32, Shaped1DAxis((2,))))))), p = ViewAxis(543:546, Shaped1DAxis((4,))))}}}, θ::ComponentArrays.ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(depvar = ViewAxis(1:542, Axis(layer_1 = ViewAxis(1:30, Axis(weight = ViewAxis(1:15, ShapedAxis((15, 1))), bias = ViewAxis(16:30, Shaped1DAxis((15,))))), layer_2 = ViewAxis(31:270, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_3 = ViewAxis(271:510, Axis(weight = ViewAxis(1:225, ShapedAxis((15, 15))), bias = ViewAxis(226:240, Shaped1DAxis((15,))))), layer_4 = ViewAxis(511:542, Axis(weight = ViewAxis(1:30, ShapedAxis((2, 15))), bias = ViewAxis(31:32, Shaped1DAxis((2,))))))), p = ViewAxis(543:546, Shaped1DAxis((4,))))}}})
  | │        @ OptimizationZygoteExt ~/.cache/julia-buildkite-plugin/depots/f8da2e12-18ea-4414-879b-afc071467714/packages/OptimizationBase/UXLhR/ext/OptimizationZygoteExt.jl:35

<!--EndFragment-->
</body>
</html>

both are yours.

@ChrisRackauckas ChrisRackauckas merged commit 0fa677e into SciML:master May 27, 2025
42 of 60 checks passed
@@ -54,7 +54,7 @@ Next we define the optimizer and [`NNODE`](@ref) which is then plugged into the
```@example param_estim_lv
opt = LBFGS(linesearch = BackTracking())
alg = NNODE(chain, opt, ps; strategy = WeightedIntervalTraining([0.7, 0.2, 0.1], 500),
param_estim = true, additional_loss)
param_estim = true, additional_loss = additional_loss)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odd that this matters, this is perfectly fine syntax, i.e. a kwarg of ;a where the value is a automatically expands to a=a.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it dint, it was working fine. The issue was somewhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants