Skip to content
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

Dual{ForwardDiff.Tag{LikelihoodProfiler... occurs in supreme field of LiklihoodProfile endpoint structures. #15

Open
TorkelE opened this issue Apr 24, 2024 · 1 comment

Comments

@TorkelE
Copy link

TorkelE commented Apr 24, 2024

When performing large-scale scans I noticed something odd:
In the EndPoint structure, the supreme field sometimes seems to be a complicated AD structure (an example is provided at the end). Is this something that I should expect?

When this happens, it also always seems to hold:
value is nothing
status is :LOSS_ERROR_STOP

If you are very interested, I could try to provide more information (but a bit hard as I saw this when checking the result of late scans). For now, two questions:

  1. Is this something that I should expect, or something odd?
  2. Can I just interpret this as that LiklihoodProfiler could not finish, and just set the endpoint to the bound?

I should also mention that this happened while doing gradient-based computation of itnervals.

Dual{ForwardDiff.Tag{LikelihoodProfiler.var"#loss_func_gd#10"{Float64, Vector{Symbol}, Int64, PEtab.var"#451#452"{SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, ModelingToolkit.var"#k#503"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x71a72f97, 0x8bd4d31f, 0xcbd41a4c, 0x6f395a82, 0xe4e46fa4), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x2315ea45, 0x6c498c5d, 0x9477b69b, 0x9121e3c5, 0xb42ff303), Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, ModelingToolkit.var"#___jac#509"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x74caff8d, 0x766c7ae9, 0x3504f839, 0xf47c720c, 0xfcdbfdf1), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0xa09e3c33, 0xbba65094, 0x7e85f24c, 0xa202f0bf, 0x36c01e12), Nothing}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.var"#678#generated_observed#513"{Bool, ModelingToolkit.ODESystem, Dict{Any, Any}, Vector{SymbolicUtils.BasicSymbolic{Real}}}, Nothing, ModelingToolkit.ODESystem, Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}, SciMLBase.StandardODEProblem}, ODESolver, SteadyStateSolver{Nothing, Float64, SciMLBase.NonlinearProblem{Vector{Float64}, true, Vector{Float64}, SciMLBase.NonlinearFunction{true, SciMLBase.AutoSpecialize, SciMLBase.var"#41#50"{SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, ModelingToolkit.var"#k#503"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x71a72f97, 0x8bd4d31f, 0xcbd41a4c, 0x6f395a82, 0xe4e46fa4), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x2315ea45, 0x6c498c5d, 0x9477b69b, 0x9121e3c5, 0xb42ff303), Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, ModelingToolkit.var"#___jac#509"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x74caff8d, 0x766c7ae9, 0x3504f839, 0xf47c720c, 0xfcdbfdf1), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0xa09e3c33, 0xbba65094, 0x7e85f24c, 0xa202f0bf, 0x36c01e12), Nothing}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.var"#678#generated_observed#513"{Bool, ModelingToolkit.ODESystem, Dict{Any, Any}, Vector{SymbolicUtils.BasicSymbolic{Real}}}, Nothing, ModelingToolkit.ODESystem, Nothing, Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, SciMLBase.var"#44#53"{SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, ModelingToolkit.var"#k#503"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x71a72f97, 0x8bd4d31f, 0xcbd41a4c, 0x6f395a82, 0xe4e46fa4), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x2315ea45, 0x6c498c5d, 0x9477b69b, 0x9121e3c5, 0xb42ff303), Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, ModelingToolkit.var"#___jac#509"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x74caff8d, 0x766c7ae9, 0x3504f839, 0xf47c720c, 0xfcdbfdf1), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0xa09e3c33, 0xbba65094, 0x7e85f24c, 0xa202f0bf, 0x36c01e12), Nothing}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.var"#678#generated_observed#513"{Bool, ModelingToolkit.ODESystem, Dict{Any, Any}, Vector{SymbolicUtils.BasicSymbolic{Real}}}, Nothing, ModelingToolkit.ODESystem, Nothing, Nothing}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.var"#678#generated_observed#513"{Bool, ModelingToolkit.ODESystem, Dict{Any, Any}, Vector{SymbolicUtils.BasicSymbolic{Real}}}, Nothing, ModelingToolkit.ODESystem, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}, SciMLBase.StandardNonlinearProblem}, SciMLBase.DiscreteCallback{PEtab.var"#147#149"{SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, ModelingToolkit.var"#k#503"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x71a72f97, 0x8bd4d31f, 0xcbd41a4c, 0x6f395a82, 0xe4e46fa4), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x2315ea45, 0x6c498c5d, 0x9477b69b, 0x9121e3c5, 0xb42ff303), Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, ModelingToolkit.var"#___jac#509"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x74caff8d, 0x766c7ae9, 0x3504f839, 0xf47c720c, 0xfcdbfdf1), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0xa09e3c33, 0xbba65094, 0x7e85f24c, 0xa202f0bf, 0x36c01e12), Nothing}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.var"#678#generated_observed#513"{Bool, ModelingToolkit.ODESystem, Dict{Any, Any}, Vector{SymbolicUtils.BasicSymbolic{Real}}}, Nothing, ModelingToolkit.ODESystem, Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}, SciMLBase.StandardODEProblem}, Float64, Float64}, typeof(PEtab.affect_terminate_ss!), typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT)}, Nothing}, PEtabModel{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:u, :t, :p_ode_problem, :θ_observable, :θ_non_dynamic, :parameter_info, :observableId, :parameter_map), PEtab.var"#_RGF_ModTag", PEtab.var"#_RGF_ModTag", (0x92ddf7b3, 0x1cc9d19a, 0xbaec34fa, 0x257e8eaa, 0x79dbcf2e), Expr}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:u0, :p_ode_problem), PEtab.var"#_RGF_ModTag", PEtab.var"#_RGF_ModTag", (0x1fbd0b86, 0x669ed9a0, 0x06dcf6bf, 0x6962dd3e, 0x2e0539d4), Expr}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:p_ode_problem,), PEtab.var"#_RGF_ModTag", PEtab.var"#_RGF_ModTag", (0x3b8b1c22, 0x1e4120d9, 0x8fd958f4, 0x1c5d0f13, 0x6c3b08a5), Expr}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:u, :t, :θ_sd, :p_ode_problem, :θ_non_dynamic, :parameter_info, :observableId, :parameter_map), PEtab.var"#_RGF_ModTag", PEtab.var"#_RGF_ModTag", (0x48465b1e, 0x68218d68, 0xac3a4da9, 0x92089d5b, 0x52cfe146), Expr}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:u, :t, :p_ode_problem, :θ_observable, :θ_non_dynamic, :observableId, :parameter_map, :out), PEtab.var"#_RGF_ModTag", PEtab.var"#_RGF_ModTag", (0x494595d1, 0x02271b05, 0x3e025731, 0xb617498f, 0xfaf52b5d), Expr}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:u, :t, :θ_sd, :p_ode_problem, :θ_non_dynamic, :parameter_info, :observableId, :parameter_map, :out), PEtab.var"#_RGF_ModTag", PEtab.var"#_RGF_ModTag", (0x5a3178c2, 0xe3713556, 0x0b94466a, 0x84d4af82, 0xb7e750aa), Expr}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:u, :t, :p_ode_problem, :θ_observable, :θ_non_dynamic, :observableId, :parameter_map, :out), PEtab.var"#_RGF_ModTag", PEtab.var"#_RGF_ModTag", (0x7b77bf93, 0x84e249eb, 0xc39ad80f, 0x80a52264, 0x8ae56d66), Expr}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:u, :t, :θ_sd, :p_ode_problem, :θ_non_dynamic, :parameter_info, :observableId, :parameter_map, :out), PEtab.var"#_RGF_ModTag", PEtab.var"#_RGF_ModTag", (0x7b77bf93, 0x84e249eb, 0xc39ad80f, 0x80a52264, 0x8ae56d66), Expr}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:u, :p), PEtab.var"#_RGF_ModTag", PEtab.var"#_RGF_ModTag", (0x5fc3bbc6, 0x4bb50cdc, 0x0bd616e0, 0x875f0bec, 0xbc417956), Expr}, SciMLBase.CallbackSet{Tuple{}, Tuple{}}, Vector{Function}, Catalyst.ReactionSystem{Catalyst.NetworkProperties{Int64, SymbolicUtils.BasicSymbolic{Real}}}}, PEtab.SimulationInfo{Dict{Symbol, SciMLBase.DECallback}, Dict{Symbol, SciMLBase.DECallback}}, PEtab.ParameterIndices, PEtab.MeasurementsInfo{Vector{Union{Float64, String}}}, PEtab.ParametersInfo, PEtab.PriorInfo, PEtab.PEtabODEProblemCache{Vector{Float64}, PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}, Vector{Float64}, Matrix{Float64}}, PEtab.PEtabODESolverCache, Bool}, ProgressMeter.ProgressUnknown, Bool}, Float64}}(8.0001,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0)
@ivborissov
Copy link
Collaborator

LOSS_ERROR_STOP stands for NLopt FORCED_STOP which is a marker of some error in the objective function or gradient computations. So the result is not reliable and you may try different algorithm/ gradient computation backend, etc.
For the Dual type in the supreme, it seems a missing type check in the code - will fix it

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

No branches or pull requests

2 participants