The applicable method may be too new: running in world age 32335, while current world is 32342

Hi,

Can you help me fix this, I am trying to run this as a loop for 10 fits (not showing the whole loop code). But currently I am failing on just one loop itself. The inspect function (only within Pumas Package) fails to execute. I have attached the function below and also the error msg. Is there a fix for this or anything that I am missing.

Thanks a lot…!!!

function combine_ebes(directory_file)

        output_file = directory_file

        fit_foce = deserialize(output_file)
        #fit_table = coefficients_table(fit_foce)   (Works fine for getting the outputs)
        fit_inspect = inspect(fit_foce)             #Fails
        fit_inspect_df = DataFrame(fit_inspect)
        
        param_df = select(fit_inspect_df, :id, :time, :CL, :Vc, :Q, :Vp, :Ka, :Kin, :Kout, :Imax, :IC50, 
                                       :η₁, :η₂, :η₃, :η₄, :η₅, :η₆, :η₇, :η₈)
        rename!(param_df, [:id, :time, :CL, :Vc, :Q, :Vp, :Ka, :Kin, :Kout, :Imax, :IC50, 
                           :eta_CL, :eta_Vc, :eta_Q, :eta_Vp, :eta_Ka, :eta_Kin, :eta_Kout, :eta_IC50])
        filtered_param_df = filter(row -> row.time == 0.0, param_df)
        
    return filtered_param_df
end

Error Message

base_ebed = combine_ebes("/home/jrun/data/code/Methodology-Project/fits_data/Base_Estimation/Simultaneous/init_foce_base_4.jls")
[ Info: Calculating predictions.
ERROR: MethodError: no method matching (::Serialization.__deserialized_types__.var"##338")(::NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}})
The applicable method may be too new: running in world age 32335, while current world is 32342.
Closest candidates are:
  (::Serialization.__deserialized_types__.var"##338")(::Any) at /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/Td3Jp/src/dsl/model_macro.jl:331 (method too new to be called from this world context.)
Stacktrace:
  [1] deorthoganalize(m::PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, tvka = 1, tvkin = 1, tvkout = 1, tvImax = 1, tvIC50 = 1, Ω = 8, σ_prop_pk = 1, σ_add_pk = 1, σ_prop_pd = 1), 8, (:Depot, :Central, :Peripheral, :Response), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, Serialization.__deserialized_types__.var"##338", Serialization.__deserialized_types__.var"##339", Nothing, Serialization.__deserialized_types__.var"##340", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{Serialization.__deserialized_types__.var"##341", Serialization.__deserialized_types__.var"##342"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Serialization.__deserialized_types__.var"##343", Serialization.__deserialized_types__.var"##344", ModelingToolkit.ODESystem}, vrandeffsorth::Vector{Float64}, param::NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}})
    @ Pumas /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/Td3Jp/src/models/model_api.jl:711
  [2] __ipredict(m::PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, tvka = 1, tvkin = 1, tvkout = 1, tvImax = 1, tvIC50 = 1, Ω = 8, σ_prop_pk = 1, σ_add_pk = 1, σ_prop_pd = 1), 8, (:Depot, :Central, :Peripheral, :Response), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, Serialization.__deserialized_types__.var"##338", Serialization.__deserialized_types__.var"##339", Nothing, Serialization.__deserialized_types__.var"##340", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{Serialization.__deserialized_types__.var"##341", Serialization.__deserialized_types__.var"##342"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Serialization.__deserialized_types__.var"##343", Serialization.__deserialized_types__.var"##344", ModelingToolkit.ODESystem}, subject::Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}, param::NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}}, vrandeffsorth::Vector{Float64}; obstimes::Nothing, diffeq_options::NamedTuple{(), Tuple{}})
    @ Pumas /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/Td3Jp/src/estimation/diagnostics.jl:401
  [3] _predict(model::PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, tvka = 1, tvkin = 1, tvkout = 1, tvImax = 1, tvIC50 = 1, Ω = 8, σ_prop_pk = 1, σ_add_pk = 1, σ_prop_pd = 1), 8, (:Depot, :Central, :Peripheral, :Response), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, Serialization.__deserialized_types__.var"##338", Serialization.__deserialized_types__.var"##339", Nothing, Serialization.__deserialized_types__.var"##340", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{Serialization.__deserialized_types__.var"##341", Serialization.__deserialized_types__.var"##342"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Serialization.__deserialized_types__.var"##343", Serialization.__deserialized_types__.var"##344", ModelingToolkit.ODESystem}, subject::Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}, param::NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}}, vrandeffsorth::Vector{Float64}; obstimes::Nothing, diffeq_options::NamedTuple{(), Tuple{}})
    @ Pumas /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/Td3Jp/src/estimation/diagnostics.jl:343
  [4] (::Pumas.var"#1126#1129"{Nothing, NamedTuple{(), Tuple{}}, PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, tvka = 1, tvkin = 1, tvkout = 1, tvImax = 1, tvIC50 = 1, Ω = 8, σ_prop_pk = 1, σ_add_pk = 1, σ_prop_pd = 1), 8, (:Depot, :Central, :Peripheral, :Response), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, Serialization.__deserialized_types__.var"##338", Serialization.__deserialized_types__.var"##339", Nothing, Serialization.__deserialized_types__.var"##340", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{Serialization.__deserialized_types__.var"##341", Serialization.__deserialized_types__.var"##342"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Serialization.__deserialized_types__.var"##343", Serialization.__deserialized_types__.var"##344", ModelingToolkit.ODESystem}, NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}}})(::Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}})
    @ Pumas /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/Td3Jp/src/estimation/diagnostics.jl:134
  [5] next
    @ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/library.jl:54 [inlined]
  [6] next(rf::Transducers.Reduction{Transducers.NoComplete, Transducers.Reduction{Transducers.Map{Pumas.var"#1126#1129"{Nothing, NamedTuple{(), Tuple{}}, PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, tvka = 1, tvkin = 1, tvkout = 1, tvImax = 1, tvIC50 = 1, Ω = 8, σ_prop_pk = 1, σ_add_pk = 1, σ_prop_pd = 1), 8, (:Depot, :Central, :Peripheral, :Response), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, Serialization.__deserialized_types__.var"##338", Serialization.__deserialized_types__.var"##339", Nothing, Serialization.__deserialized_types__.var"##340", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{Serialization.__deserialized_types__.var"##341", Serialization.__deserialized_types__.var"##342"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Serialization.__deserialized_types__.var"##343", Serialization.__deserialized_types__.var"##344", ModelingToolkit.ODESystem}, NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}}}}, Transducers.Reduction{Transducers.Map{Type{BangBang.NoBang.SingletonVector}}, Transducers.BottomRF{Transducers.Completing{typeof(BangBang.append!!)}}}}}, result::BangBang.NoBang.Empty{Vector}, input::Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}})
    @ Transducers /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/core.jl:785
  [7] macro expansion
    @ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/core.jl:181 [inlined]
  [8] _foldl_array
    @ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/processes.jl:187 [inlined]
  [9] __foldl__
    @ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/processes.jl:182 [inlined]
 [10] foldl_basecase
    @ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/processes.jl:365 [inlined]
 [11] _reduce_basecase(rf::Transducers.Reduction{Transducers.Map{Pumas.var"#1126#1129"{Nothing, NamedTuple{(), Tuple{}}, PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, tvka = 1, tvkin = 1, tvkout = 1, tvImax = 1, tvIC50 = 1, Ω = 8, σ_prop_pk = 1, σ_add_pk = 1, σ_prop_pd = 1), 8, (:Depot, :Central, :Peripheral, :Response), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, Serialization.__deserialized_types__.var"##338", Serialization.__deserialized_types__.var"##339", Nothing, Serialization.__deserialized_types__.var"##340", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{Serialization.__deserialized_types__.var"##341", Serialization.__deserialized_types__.var"##342"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Serialization.__deserialized_types__.var"##343", Serialization.__deserialized_types__.var"##344", ModelingToolkit.ODESystem}, NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}}}}, Transducers.Reduction{Transducers.Map{Type{BangBang.NoBang.SingletonVector}}, Transducers.BottomRF{Transducers.Completing{typeof(BangBang.append!!)}}}}, init::BangBang.NoBang.Empty{Vector}, reducible::Transducers.SizedReducible{SubArray{Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}, 1, Vector{Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}, Tuple{UnitRange{Int64}}, true}, Int64})
    @ Transducers /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/threading_utils.jl:56
 [12] _reduce(ctx::Transducers.NoopDACContext, rf::Transducers.Reduction{Transducers.Map{Pumas.var"#1126#1129"{Nothing, NamedTuple{(), Tuple{}}, PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, tvka = 1, tvkin = 1, tvkout = 1, tvImax = 1, tvIC50 = 1, Ω = 8, σ_prop_pk = 1, σ_add_pk = 1, σ_prop_pd = 1), 8, (:Depot, :Central, :Peripheral, :Response), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, Serialization.__deserialized_types__.var"##338", Serialization.__deserialized_types__.var"##339", Nothing, Serialization.__deserialized_types__.var"##340", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{Serialization.__deserialized_types__.var"##341", Serialization.__deserialized_types__.var"##342"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Serialization.__deserialized_types__.var"##343", Serialization.__deserialized_types__.var"##344", ModelingToolkit.ODESystem}, NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}}}}, Transducers.Reduction{Transducers.Map{Type{BangBang.NoBang.SingletonVector}}, Transducers.BottomRF{Transducers.Completing{typeof(BangBang.append!!)}}}}, init::BangBang.NoBang.Empty{Vector}, reducible::Transducers.SizedReducible{SubArray{Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}, 1, Vector{Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}, Tuple{UnitRange{Int64}}, true}, Int64})
    @ Transducers /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/reduce.jl:150
 [13] _reduce(ctx::Transducers.NoopDACContext, rf::Transducers.Reduction{Transducers.Map{Pumas.var"#1126#1129"{Nothing, NamedTuple{(), Tuple{}}, PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, tvka = 1, tvkin = 1, tvkout = 1, tvImax = 1, tvIC50 = 1, Ω = 8, σ_prop_pk = 1, σ_add_pk = 1, σ_prop_pd = 1), 8, (:Depot, :Central, :Peripheral, :Response), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, Serialization.__deserialized_types__.var"##338", Serialization.__deserialized_types__.var"##339", Nothing, Serialization.__deserialized_types__.var"##340", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{Serialization.__deserialized_types__.var"##341", Serialization.__deserialized_types__.var"##342"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Serialization.__deserialized_types__.var"##343", Serialization.__deserialized_types__.var"##344", ModelingToolkit.ODESystem}, NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}}}}, Transducers.Reduction{Transducers.Map{Type{BangBang.NoBang.SingletonVector}}, Transducers.BottomRF{Transducers.Completing{typeof(BangBang.append!!)}}}}, init::BangBang.NoBang.Empty{Vector}, reducible::Transducers.SizedReducible{SubArray{Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}, 1, Vector{Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}, Tuple{UnitRange{Int64}}, true}, Int64}) (repeats 4 times)
    @ Transducers /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/reduce.jl:159
 [14] _transduce_assoc_nocomplete
    @ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/reduce.jl:139 [inlined]
 [15] transduce_assoc(xform::Transducers.Composition{Transducers.Map{Pumas.var"#1126#1129"{Nothing, NamedTuple{(), Tuple{}}, PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, tvka = 1, tvkin = 1, tvkout = 1, tvImax = 1, tvIC50 = 1, Ω = 8, σ_prop_pk = 1, σ_add_pk = 1, σ_prop_pd = 1), 8, (:Depot, :Central, :Peripheral, :Response), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, Serialization.__deserialized_types__.var"##338", Serialization.__deserialized_types__.var"##339", Nothing, Serialization.__deserialized_types__.var"##340", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{Serialization.__deserialized_types__.var"##341", Serialization.__deserialized_types__.var"##342"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Serialization.__deserialized_types__.var"##343", Serialization.__deserialized_types__.var"##344", ModelingToolkit.ODESystem}, NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}}}}, Transducers.Map{Type{BangBang.NoBang.SingletonVector}}}, step::Transducers.Completing{typeof(BangBang.append!!)}, init::BangBang.NoBang.Empty{Vector}, coll0::Vector{Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}; simd::Val{false}, basesize::Int64, stoppable::Nothing, nestlevel::Nothing)
    @ Transducers /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/reduce.jl:108
 [16] foldxt(step::typeof(BangBang.append!!), xform::Transducers.Composition{Transducers.Map{Pumas.var"#1126#1129"{Nothing, NamedTuple{(), Tuple{}}, PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, tvka = 1, tvkin = 1, tvkout = 1, tvImax = 1, tvIC50 = 1, Ω = 8, σ_prop_pk = 1, σ_add_pk = 1, σ_prop_pd = 1), 8, (:Depot, :Central, :Peripheral, :Response), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, RealDomain{Float64, Float64, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, Serialization.__deserialized_types__.var"##338", Serialization.__deserialized_types__.var"##339", Nothing, Serialization.__deserialized_types__.var"##340", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{Serialization.__deserialized_types__.var"##341", Serialization.__deserialized_types__.var"##342"}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Serialization.__deserialized_types__.var"##343", Serialization.__deserialized_types__.var"##344", ModelingToolkit.ODESystem}, NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :tvka, :tvkin, :tvkout, :tvImax, :tvIC50, :Ω, :σ_prop_pk, :σ_add_pk, :σ_prop_pd), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64, Float64, Float64}}}}, Transducers.Map{Type{BangBang.NoBang.SingletonVector}}}, itr::Vector{Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}; init::BangBang.NoBang.Empty{Vector}, kwargs::Base.Pairs{Symbol, Int64, Tuple{Symbol}, NamedTuple{(:basesize,), Tuple{Int64}}})
    @ Transducers /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/reduce.jl:246
 [17] #tcopy#177
    @ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/reduce.jl:354 [inlined]
 [18] #tcollect#183
    @ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Transducers/DSfBv/src/reduce.jl:423 [inlined]
 [19] __map(f::Function, itr::Vector{Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ ThreadsX.Implementations /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/ThreadsX/vXfYv/src/map.jl:1
 [20] __map
    @ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/ThreadsX/vXfYv/src/map.jl:1 [inlined]
 [21] _map(::Function, ::Vector{Tuple{Vector{Float64}, Subject{NamedTuple{(:DV, :DV_Resp), Tuple{Vector{Union{Missing, Float64}}, Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(), Tuple{}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ ThreadsX.Implementations /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/ThreadsX/vXfYv/src/map.jl:13

Try @invokelatest inspect(fit_foce).

See also here for a detailed explanation, and here for an explanation of invokelatest. I guess the issue here is that your deserialize(output_file) is reconstructing a function, not just data, hence the need for @invokelatest.

Is @invokelatest not part of the Base package. It says @invokelatest not defined, using Julia version 1.7.3.

I tried this invokelatest(inspect(fit)) but with no help still get the same error.

Prior to Julia 1.9, it’s Base.@invokelatest inspect(fit) or Base.invokelatest(inspect, fit). In Julia 1.9 (highly recommended) it was exported (julia#45831). (This should be clarified in the docs: julia#50341.)

2 Likes

Thanks a ton. This was really helpful.