Hi,
I was attempting to run a previously run fit, however, it failed due to a taskfailedexception issue after the Julia version was updated.
So I attempted to deserialize the “.jls” file that I had saved for that run, but Julia was unable to run it.
Can anyone help me with this?
model_PK = @model begin
@param begin
tvcl ∈ RealDomain(lower=0)
tvvc ∈ RealDomain(lower=0)
tvvp ∈ RealDomain(lower=0)
tvvp2 ∈ RealDomain(lower=0)
tvq ∈ RealDomain(lower=0)
tvq2 ∈ RealDomain(lower=0)
θ1 ∈ RealDomain(lower=0)
θ2 ∈ RealDomain(lower=0)
Ω ∈ PDiagDomain(4)
σ_prop ∈ RealDomain(lower=0.001)
end
@random begin
η ~ MvNormal(Ω)
end
@covariates CRCL HT
@pre begin
CL = tvcl * CRCL^θ1 * exp(η[1])
Vc = tvvc * exp(η[2])
Vp = (tvvp + (HT-164.3)*θ2) * exp(η[3])
Vp2 = tvvp2
Q = tvq
Q2 = tvq2 * exp(η[4])
end
@dynamics begin
Central' = -((CL/Vc)*Central) - ((Q/Vc)*Central) - ((Q2/Vc)*Central) + ((Q/Vp)*Peripheral1) + ((Q2/Vp2)*Peripheral2)
Peripheral1' = ((Q/Vc)*Central) - ((Q/Vp)*Peripheral1)
Peripheral2' = ((Q2/Vc)*Central) - ((Q2/Vp2)*Peripheral2)
end
@derived begin
mean_conc := @. (Central/Vc)
DV ~ @. Normal(mean_conc, abs(mean_conc)*σ_prop)
end
end
Param_PK=((tvcl = 1.2982,
tvvc = 4.2812,
tvvp = 25.548,
tvvp2 = 86.773,
tvq = 2.4905,
tvq2 = 1.86,
θ1 = 0.28024,
θ2 = 0.1,
Ω = Diagonal([0.15101, 0.98709, 1.0335, 7.1564]),
σ_prop = 0.40838))
est_PK=fit(model_PK,
Propofol_pop,
Param_PK, Pumas.FOCEI(), constantcoef=(tvq2=1.86,))
ser_PK = serialize("/home/jrun/data/code/Propofol/PD/PD_serialize/run_PK.jls",est_PK)
est_PK = deserialize("/home/jrun/data/code/Propofol/PD/PD_serialize/run_PK.jls")
ERROR: TaskFailedException
Stacktrace:
[1] wait
@ ./task.jl:334 [inlined]
[2] threading_run(func::Function)
@ Base.Threads ./threadingconstructs.jl:38
[3] macro expansion
@ ./threadingconstructs.jl:97 [inlined]
[4] _update_ebes_and_evaluate_marginal_nll_threads!(m::PumasModel{(tvcl = 1, tvvc = 1, tvvp = 1, tvvp2 = 1, tvq = 1, tvq2 = 1, θ1 = 1, θ2 = 1, Ω = 4, σ_prop = 1), 4, ParamSet{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, var"#55#79", var"#56#80", var"#58#82", var"#60#84", Pumas.LinearODE, var"#61#85", var"#70#94", ModelingToolkit.ODESystem}, population::Vector{Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:AGE, :GENDER, :WT, :HT, :BMI, :CRCL, :RF, :LBM, :EBW), Tuple{Int64, Int64, Float64, Float64, Float64, Float64, Int64, Float64, Float64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}, param::NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64}}, vvrandeffs::Vector{Vector{Float64}}, vvrandeffs_tmp::Vector{Vector{Float64}}, approx::Pumas.FOCE, diffeq_options::NamedTuple{(), Tuple{}})
@ Pumas /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/Ozwn0/src/estimation/likelihoods.jl:2334
[5] #521
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/Ozwn0/src/estimation/likelihoods.jl:2828 [inlined]
[6] (::NLSolversBase.var"#55#56"{NLSolversBase.InplaceObjective{Nothing, Pumas.var"#521#523"{PumasModel{(tvcl = 1, tvvc = 1, tvvp = 1, tvvp2 = 1, tvq = 1, tvq2 = 1, θ1 = 1, θ2 = 1, Ω = 4, σ_prop = 1), 4, ParamSet{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, var"#55#79", var"#56#80", var"#58#82", var"#60#84", Pumas.LinearODE, var"#61#85", var"#70#94", ModelingToolkit.ODESystem}, Vector{Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:AGE, :GENDER, :WT, :HT, :BMI, :CRCL, :RF, :LBM, :EBW), Tuple{Int64, Int64, Float64, Float64, Float64, Float64, Int64, Float64, Float64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}, Pumas.FOCE, EnsembleThreads, NamedTuple{(), Tuple{}}, TransformVariables.TransformTuple{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{TransformVariables.ShiftedExp{true, Float64}, TransformVariables.ShiftedExp{true, Float64}, TransformVariables.ShiftedExp{true, Float64}, TransformVariables.ShiftedExp{true, Float64}, TransformVariables.ShiftedExp{true, Float64}, Pumas.ConstantTransform{Float64}, TransformVariables.ShiftedExp{true, Float64}, TransformVariables.ShiftedExp{true, Float64}, Pumas.PDiagTransform, TransformVariables.ShiftedExp{true, Float64}}}}, Vector{Vector{Float64}}, Vector{Vector{Float64}}, Vector{Float64}}, Nothing, Nothing, Nothing}, Float64})(x::Vector{Float64})
@ NLSolversBase /builds/PumasAI/PumasSystemImages-jl/.julia/packages/NLSolversBase/cfJrN/src/objective_types/incomplete.jl:44
[7] value!!(obj::NLSolversBase.OnceDifferentiable{Float64, Vector{Float64}, Vector{Float64}}, x::Vector{Float64})
@ NLSolversBase /builds/PumasAI/PumasSystemImages-jl/.julia/packages/NLSolversBase/cfJrN/src/interface.jl:9
[8] value!(obj::NLSolversBase.OnceDifferentiable{Float64, Vector{Float64}, Vector{Float64}}, x::Vector{Float64})
@ NLSolversBase /builds/PumasAI/PumasSystemImages-jl/.julia/packages/NLSolversBase/cfJrN/src/interface.jl:28
[9] value!(obj::Optim.ManifoldObjective{NLSolversBase.OnceDifferentiable{Float64, Vector{Float64}, Vector{Float64}}}, x::Vector{Float64})
@ Optim /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Optim/LScFu/src/Manifolds.jl:31
[10] (::LineSearches.var"#ϕ#1"{Optim.ManifoldObjective{NLSolversBase.OnceDifferentiable{Float64, Vector{Float64}, Vector{Float64}}}, Vector{Float64}, Vector{Float64}, Vector{Float64}})(α::Float64)
@ LineSearches /builds/PumasAI/PumasSystemImages-jl/.julia/packages/LineSearches/Ki4c5/src/LineSearches.jl:25
[11] (::LineSearches.BackTracking{Float64, Int64})(ϕ::LineSearches.var"#ϕ#1"{Optim.ManifoldObjective{NLSolversBase.OnceDifferentiable{Float64, Vector{Float64}, Vector{Float64}}}, Vector{Float64}, Vector{Float64}, Vector{Float64}}, αinitial::Float64, ϕ_0::Float64, dϕ_0::Float64)
@ LineSearches /builds/PumasAI/PumasSystemImages-jl/.julia/packages/LineSearches/Ki4c5/src/backtracking.jl:114
[12] BackTracking
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/LineSearches/Ki4c5/src/backtracking.jl:33 [inlined]
[13] BackTracking
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/LineSearches/Ki4c5/src/backtracking.jl:23 [inlined]
[14] perform_linesearch!(state::Optim.BFGSState{Vector{Float64}, Matrix{Float64}, Float64, Vector{Float64}}, method::Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}, d::Optim.ManifoldObjective{NLSolversBase.OnceDifferentiable{Float64, Vector{Float64}, Vector{Float64}}})
@ Optim /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Optim/LScFu/src/utilities/perform_linesearch.jl:59
[15] update_state!(d::NLSolversBase.OnceDifferentiable{Float64, Vector{Float64}, Vector{Float64}}, state::Optim.BFGSState{Vector{Float64}, Matrix{Float64}, Float64, Vector{Float64}}, method::Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat})
@ Optim /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Optim/LScFu/src/multivariate/solvers/first_order/bfgs.jl:139
[16] optimize(d::NLSolversBase.OnceDifferentiable{Float64, Vector{Float64}, Vector{Float64}}, initial_x::Vector{Float64}, method::Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}, options::Optim.Options{Float64, Pumas.var"#491#493"{Pumas.DefaultOptimizeFN{Nothing, NamedTuple{(:show_trace, :store_trace, :extended_trace, :g_tol, :allow_f_increases), Tuple{Bool, Bool, Bool, Float64, Bool}}}, Pumas.var"#522#524"{Pumas.FOCE, Bool, NLSolversBase.OnceDifferentiable{Float64, Vector{Float64}, Vector{Float64}}, TransformVariables.TransformTuple{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{TransformVariables.ShiftedExp{true, Float64}, TransformVariables.ShiftedExp{true, Float64}, TransformVariables.ShiftedExp{true, Float64}, TransformVariables.ShiftedExp{true, Float64}, TransformVariables.ShiftedExp{true, Float64}, Pumas.ConstantTransform{Float64}, TransformVariables.ShiftedExp{true, Float64}, TransformVariables.ShiftedExp{true, Float64}, Pumas.PDiagTransform, TransformVariables.ShiftedExp{true, Float64}}}}, Vector{Vector{Float64}}, Vector{Vector{Float64}}}}}, state::Optim.BFGSState{Vector{Float64}, Matrix{Float64}, Float64, Vector{Float64}})
@ Optim /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Optim/LScFu/src/multivariate/optimize/optimize.jl:54
[17] optimize
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Optim/LScFu/src/multivariate/optimize/optimize.jl:36 [inlined]
[18] DefaultOptimizeFN
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/Ozwn0/src/estimation/likelihoods.jl:2152 [inlined]
[19] _fit(m::PumasModel{(tvcl = 1, tvvc = 1, tvvp = 1, tvvp2 = 1, tvq = 1, tvq2 = 1, θ1 = 1, θ2 = 1, Ω = 4, σ_prop = 1), 4, ParamSet{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, var"#55#79", var"#56#80", var"#58#82", var"#60#84", Pumas.LinearODE, var"#61#85", var"#70#94", ModelingToolkit.ODESystem}, population::Vector{Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:AGE, :GENDER, :WT, :HT, :BMI, :CRCL, :RF, :LBM, :EBW), Tuple{Int64, Int64, Float64, Float64, Float64, Float64, Int64, Float64, Float64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}, param::NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Diagonal{Float64, Vector{Float64}}, Float64}}, approx::Pumas.FOCE, ensemblealg::EnsembleThreads, optimize_fn::Pumas.DefaultOptimizeFN{Nothing, NamedTuple{(:show_trace, :store_trace, :extended_trace, :g_tol, :allow_f_increases), Tuple{Bool, Bool, Bool, Float64, Bool}}}, fixedparamset::ParamSet{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, Pumas.ConstDomain{Float64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, fixedparam::NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Diagonal{Float64, Vector{Float64}}, Float64}}, checkidentification::Bool, diffeq_options::NamedTuple{(), Tuple{}})
@ Pumas /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/Ozwn0/src/estimation/likelihoods.jl:2913
[20] fit(m::PumasModel{(tvcl = 1, tvvc = 1, tvvp = 1, tvvp2 = 1, tvq = 1, tvq2 = 1, θ1 = 1, θ2 = 1, Ω = 4, σ_prop = 1), 4, ParamSet{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, var"#55#79", var"#56#80", var"#58#82", var"#60#84", Pumas.LinearODE, var"#61#85", var"#70#94", ModelingToolkit.ODESystem}, population::Vector{Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:AGE, :GENDER, :WT, :HT, :BMI, :CRCL, :RF, :LBM, :EBW), Tuple{Int64, Int64, Float64, Float64, Float64, Float64, Int64, Float64, Float64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}, param::NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, Diagonal{Float64, Vector{Float64}}, Float64}}, approx::Pumas.FOCE; optimize_fn::Pumas.DefaultOptimizeFN{Nothing, NamedTuple{(:show_trace, :store_trace, :extended_trace, :g_tol, :allow_f_increases), Tuple{Bool, Bool, Bool, Float64, Bool}}}, constantcoef::NamedTuple{(:tvq2,), Tuple{Float64}}, omegas::Tuple{}, ensemblealg::EnsembleThreads, checkidentification::Bool, diffeq_options::NamedTuple{(), Tuple{}})
@ Pumas /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/Ozwn0/src/estimation/likelihoods.jl:2732
[21] top-level scope
@ ~/data/code/Propofol/PD/PD_model.jl:85
nested task error: DomainError with NaN:
Normal: the condition σ >= zero(σ) is not satisfied.
Stacktrace:
[1] #360
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Distributions/Ooh1r/src/univariate/continuous/normal.jl:37 [inlined]
[2] check_args
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Distributions/Ooh1r/src/utils.jl:89 [inlined]
[3] #Normal#359
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Distributions/Ooh1r/src/univariate/continuous/normal.jl:37 [inlined]
[4] Normal
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Distributions/Ooh1r/src/univariate/continuous/normal.jl:37 [inlined]
[5] _broadcast_getindex_evalf
@ ./broadcast.jl:670 [inlined]
[6] _broadcast_getindex
@ ./broadcast.jl:643 [inlined]
[7] getindex
@ ./broadcast.jl:597 [inlined]
[8] macro expansion
@ ./broadcast.jl:961 [inlined]
[9] macro expansion
@ ./simdloop.jl:77 [inlined]
[10] copyto!
@ ./broadcast.jl:960 [inlined]
[11] copyto!
@ ./broadcast.jl:913 [inlined]
[12] copy
@ ./broadcast.jl:885 [inlined]
[13] materialize
@ ./broadcast.jl:860 [inlined]
[14] (::var"#61#85")(_pre::Pumas.Pre{Nothing, var"#57#81"{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64}}, NamedTuple{(:η,), Tuple{Vector{Float64}}}, Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:AGE, :GENDER, :WT, :HT, :BMI, :CRCL, :RF, :LBM, :EBW), Tuple{Int64, Int64, Float64, Float64, Float64, Float64, Int64, Float64, Float64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}, _sol::Pumas.PKPDAnalyticalSolution{LabelledArrays.SLArray{Tuple{3}, Float64, 1, 3, (:Central, :Peripheral1, :Peripheral2)}, 2, Vector{LabelledArrays.SLArray{Tuple{3}, Float64, 1, 3, (:Central, :Peripheral1, :Peripheral2)}}, Vector{Float64}, Vector{LabelledArrays.SLArray{Tuple{3}, Float64, 1, 3, (:Central, :Peripheral1, :Peripheral2)}}, Vector{LabelledArrays.SLArray{Tuple{3}, Float64, 1, 3, (:Central, :Peripheral1, :Peripheral2)}}, Pumas.Pre{Nothing, var"#57#81"{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64}}, NamedTuple{(:η,), Tuple{Vector{Float64}}}, Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:AGE, :GENDER, :WT, :HT, :BMI, :CRCL, :RF, :LBM, :EBW), Tuple{Int64, Int64, Float64, Float64, Float64, Float64, Int64, Float64, Float64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}, Pumas.AnalyticalPKPDProblem{LabelledArrays.SLArray{Tuple{3}, Float64, 1, 3, (:Central, :Peripheral1, :Peripheral2)}, Float64, false, Pumas.LinearODE, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}, Pumas.Pre{Nothing, var"#57#81"{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64}}, NamedTuple{(:η,), Tuple{Vector{Float64}}}, Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:AGE, :GENDER, :WT, :HT, :BMI, :CRCL, :RF, :LBM, :EBW), Tuple{Int64, Int64, Float64, Float64, Float64, Float64, Int64, Float64, Float64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}, Float32}}, _obstimes::Vector{Float64}, _subject::Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:AGE, :GENDER, :WT, :HT, :BMI, :CRCL, :RF, :LBM, :EBW), Tuple{Int64, Int64, Float64, Float64, Float64, Float64, Int64, Float64, Float64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}, _param::NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64}}, _random::NamedTuple{(:η,), Tuple{Vector{Float64}}})
@ Main /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/Ozwn0/src/dsl/model_macro.jl:985
[15] #_derived#266
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/Ozwn0/src/models/model_api.jl:897 [inlined]
[16] #conditional_nll#408
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/Ozwn0/src/estimation/likelihoods.jl:526 [inlined]
[17] _penalized_conditional_nll(model::PumasModel{(tvcl = 1, tvvc = 1, tvvp = 1, tvvp2 = 1, tvq = 1, tvq2 = 1, θ1 = 1, θ2 = 1, Ω = 4, σ_prop = 1), 4, ParamSet{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, var"#55#79", var"#56#80", var"#58#82", var"#60#84", Pumas.LinearODE, var"#61#85", var"#70#94", ModelingToolkit.ODESystem}, subject::Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:AGE, :GENDER, :WT, :HT, :BMI, :CRCL, :RF, :LBM, :EBW), Tuple{Int64, Int64, Float64, Float64, Float64, Float64, Int64, Float64, Float64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}, param::NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64}}, vrandeffsorth::Vector{Float64}, diffeq_options::NamedTuple{(), Tuple{}})
@ Pumas /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/Ozwn0/src/estimation/likelihoods.jl:578
[18] _fgh!
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/Ozwn0/src/estimation/likelihoods.jl:655 [inlined]
[19] (::NLSolversBase.var"#95#101"{NLSolversBase.InplaceObjective{Nothing, Nothing, Pumas.var"#_fgh!#410"{PumasModel{(tvcl = 1, tvvc = 1, tvvp = 1, tvvp2 = 1, tvq = 1, tvq2 = 1, θ1 = 1, θ2 = 1, Ω = 4, σ_prop = 1), 4, ParamSet{NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, var"#55#79", var"#56#80", var"#58#82", var"#60#84", Pumas.LinearODE, var"#61#85", var"#70#94", ModelingToolkit.ODESystem}, Subject{NamedTuple{(:DV,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:AGE, :GENDER, :WT, :HT, :BMI, :CRCL, :RF, :LBM, :EBW), Tuple{Int64, Int64, Float64, Float64, Float64, Float64, Int64, Float64, Float64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}, NamedTuple{(:tvcl, :tvvc, :tvvp, :tvvp2, :tvq, :tvq2, :θ1, :θ2, :Ω, :σ_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Float64, Float64, Float64, PDMats.PDiagMat{Float64, Vector{Float64}}, Float64}}, Pumas.FOCE, NamedTuple{(), Tuple{}}, TransformVariables.TransformTuple{NamedTuple{(:η,), Tuple{Pumas.MvNormalTransform{ZeroMeanDiagNormal{Tuple{Base.OneTo{Int64}}}}}}}, ParamSet{NamedTuple{(:η,), Tuple{ZeroMeanDiagNormal{Tuple{Base.OneTo{Int64}}}}}}}, Nothing, Nothing}, Float64})(x::Vector{Float64})
@ NLSolversBase /builds/PumasAI/PumasSystemImages-jl/.julia/packages/NLSolversBase/cfJrN/src/objective_types/incomplete.jl:112
[20] value!!(obj::NLSolversBase.TwiceDifferentiable{Float64, Vector{Float64}, Matrix{Float64}, Vector{Float64}}, x::Vector{Float64})
@ NLSolversBase /builds/PumasAI/PumasSystemImages-jl/.julia/packages/NLSolversBase/cfJrN/src/interface.jl:9
[21] value!
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/NLSolversBase/cfJrN/src/interface.jl:28 [inlined]
[22] update_state!(d::NLSolversBase.TwiceDifferentiable{Float64, Vector{Float64}, Matrix{Float64}, Vector{Float64}}, state::Optim.NewtonTrustRegionState{Vector{Float64}, Float64, Vector{Float64}}, method::Optim.NewtonTrustRegion{Float64})
@ Optim /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Optim/LScFu/src/multivariate/solvers/second_order/newton_trust_region.jl:340
[23] optimize(d::NLSolversBase.TwiceDifferentiable{Float64, Vector{Float64}, Matrix{Float64}, Vector{Float64}}, initial_x::Vector{Float64}, method::Optim.NewtonTrustRegion{Float64}, options::Optim.Options{Float64, Nothing}, state::Optim.NewtonTrustRegionState{Vector{Float64}, Float64, Vector{Float64}})
@ Optim /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Optim/LScFu/src/multivariate/optimize/optimize.jl:54
[24] optimize
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Optim/LScFu/src/multivariate/optimize/optimize.jl:36 [inlined]
julia> est_PK = deserialize("/home/jrun/data/code/Propofol/PD/PD_serialize/run_PK.jls")
ERROR: TypeError: in Type{...} expression, expected UnionAll, got Type{Optim.MultivariateOptimizationResults{Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}, Float64, Vector{Float64}, Float64, Float64, Vector{Optim.OptimizationState{Float64, Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}}}, Bool}}
Stacktrace:
[1] deserialize_datatype(s::Serializer{IOStream}, full::Bool)
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:1356
[2] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:854
[3] deserialize(s::Serializer{IOStream})
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:801
[4] deserialize_datatype(s::Serializer{IOStream}, full::Bool)
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:1356
[5] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:854
[6] deserialize(s::Serializer{IOStream})
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:801
[7] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:861
[8] deserialize(s::Serializer{IOStream})
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:801
[9] handle_deserialize(s::Serializer{IOStream}, b::Int32)
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:907
[10] deserialize
@ /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:801 [inlined]
[11] deserialize(s::IOStream)
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:788
[12] open(f::typeof(deserialize), args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./io.jl:330
[13] open
@ ./io.jl:328 [inlined]
[14] deserialize(filename::String)
@ Serialization /opt/julia-1.7.1/share/julia/stdlib/v1.7/Serialization/src/Serialization.jl:798
[15] top-level scope
@ ~/data/code/Propofol/PD/PD_model.jl:91