Hi!
Hi! I’m not sure if what I have highlighted below is a bug/missing design feature/necessary evil. Could anyone enlighten me? Thanks!
I’m using the excellent build_loss_objective() function from DiffEqParamEstim.jl, to build differentiable loss functions on the solutions of ODEs
build_loss_objective(…;mpg_autodiff=true) provides automatic differentiation of the loss, using ForwardDiff. The fallback is a finite-difference derivative. mpg_autodiff works great on individual ODEProblems.
Unfortunately, if I use build_loss_objective() on an EnsembleProblem, it only works if mpg_autodiff is set to false. Otherwise, I get the following bug:
ERROR: type EnsembleProblem has no field p
Stacktrace:
[1] getproperty(::EnsembleProblem{ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(pf_func),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},typeof(prob_func),typeof(DiffEqBase.DEFAULT_OUTPUT_FUNC),typeof(DiffEqBase.DEFAULT_REDUCTION),Nothing}, ::Symbol) at ./Base.jl:33
[2] top-level scope at REPL[182]:1
[3] eval(::Module, ::Any) at ./boot.jl:331
[4] eval_user_input(::Any, ::REPL.REPLBackend) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
[5] run_backend(::REPL.REPLBackend) at /Users/dhruvaraman/.julia/packages/Revise/MgvIv/src/Revise.jl:1023
[6] top-level scope at none:0
Rather than provide a minimal working example of my own, I will hijack the tutorial here. If you add the kwarg ‘mpg_autodiff = true’ to the build_loss_objective() function, the same type of error occurs.
Thanks!