Closed jonniedie closed 3 years ago
Reproducer? I can't reproduce on latest versions.
FWIW, I am on 1.6.0-rc1. That could be something
Julia Version 1.6.0-rc1
Commit a58bdd9010 (2021-02-06 15:49 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin18.7.0)
CPU: Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, westmere)
Environment:
JULIA_NUM_THREADS = 8
JULIA_REVISE_WORKER_ONLY = 1
Status `~/.julia/environments/v1.6/Project.toml`
[0c46a032] DifferentialEquations v6.16.0
[c3e4b0f8] Pluto v0.12.20
Here's a saved notebook that reproduces it for me. I think it should work if you just open it up up in Pluto.
### A Pluto.jl notebook ###
# v0.12.20
using Markdown
using InteractiveUtils
# ╔═╡ 72ef6b9e-7af4-11eb-2c7b-5d41b939781d
using DifferentialEquations
# ╔═╡ 80e83654-7af4-11eb-14f6-ed421dc94a40
f(dx, x, p, t) = (dx .= p*x)
# ╔═╡ 8b6d6d18-7af4-11eb-1a9f-79fd6f522d5d
x0 = [1, 0]
# ╔═╡ 980e2be0-7af4-11eb-0008-f394252de978
A = [0 1; -1.0 -1]
# ╔═╡ a76930b2-7af4-11eb-304f-0120cbf3ce5c
prob = ODEProblem(f, x0, (0.0, 100.0), A)
# ╔═╡ b5113688-7af4-11eb-0e95-99ca21c18bfc
ens_prob = EnsembleProblem(prob;
prob_func = (prob,i,rep) -> (prob.p[2,1] = -rand(); prob),
)
# ╔═╡ fb05d36a-7af4-11eb-1271-e5bc01a88fd5
sols = solve(ens_prob; trajectories=100)
# ╔═╡ Cell order:
# ╠═72ef6b9e-7af4-11eb-2c7b-5d41b939781d
# ╠═80e83654-7af4-11eb-14f6-ed421dc94a40
# ╠═8b6d6d18-7af4-11eb-1a9f-79fd6f522d5d
# ╠═980e2be0-7af4-11eb-0008-f394252de978
# ╠═a76930b2-7af4-11eb-304f-0120cbf3ce5c
# ╠═b5113688-7af4-11eb-0e95-99ca21c18bfc
# ╠═fb05d36a-7af4-11eb-1271-e5bc01a88fd5
I also get it in 1.5.3.
That seems fine in the REPL for me. Is it only Pluto?
Yeah, only Pluto. It's fine in the REPL.
oh what error does it throw? I don't use Pluto.
I was thinking it might just be a Pluto quirk, but the error says type EnsembleSolution has no field prob
, so for some reason it's looking for a property named prob
.
Failed to show value:
type EnsembleSolution has no field prob
getproperty(::SciMLBase.EnsembleSolution{Float64, 3, Vector{OrdinaryDiffEq.ODECompositeSolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Matrix{Float64}, SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, OrdinaryDiffEq.CompositeAlgorithm{Tuple{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}}, OrdinaryDiffEq.AutoSwitchCache{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}, Rational{Int64}, Int64}}, OrdinaryDiffEq.CompositeInterpolationData{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, OrdinaryDiffEq.Rosenbrock23Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rosenbrock23Tableau{Float64}, SciMLBase.TimeGradientWrapper{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, Matrix{Float64}}, SciMLBase.UJacobianWrapper{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, Matrix{Float64}}, DiffEqBase.DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, OrdinaryDiffEq.AutoSwitchCache{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}, Rational{Int64}, Int64}}}, DiffEqBase.DEStats}}}, ::Symbol)@Base.jl:33
rows(::SciMLBase.EnsembleSolution{Float64, 3, Vector{OrdinaryDiffEq.ODECompositeSolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Matrix{Float64}, SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, OrdinaryDiffEq.CompositeAlgorithm{Tuple{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}}, OrdinaryDiffEq.AutoSwitchCache{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}, Rational{Int64}, Int64}}, OrdinaryDiffEq.CompositeInterpolationData{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, OrdinaryDiffEq.Rosenbrock23Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rosenbrock23Tableau{Float64}, SciMLBase.TimeGradientWrapper{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, Matrix{Float64}}, SciMLBase.UJacobianWrapper{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, Matrix{Float64}}, DiffEqBase.DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, OrdinaryDiffEq.AutoSwitchCache{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}, Rational{Int64}, Int64}}}, DiffEqBase.DEStats}}})@tabletraits.jl:22
table_data(::SciMLBase.EnsembleSolution{Float64, 3, Vector{OrdinaryDiffEq.ODECompositeSolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Matrix{Float64}, SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, OrdinaryDiffEq.CompositeAlgorithm{Tuple{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}}, OrdinaryDiffEq.AutoSwitchCache{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}, Rational{Int64}, Int64}}, OrdinaryDiffEq.CompositeInterpolationData{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, OrdinaryDiffEq.Rosenbrock23Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rosenbrock23Tableau{Float64}, SciMLBase.TimeGradientWrapper{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, Matrix{Float64}}, SciMLBase.UJacobianWrapper{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, Matrix{Float64}}, DiffEqBase.DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, OrdinaryDiffEq.AutoSwitchCache{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}, Rational{Int64}, Int64}}}, DiffEqBase.DEStats}}}, ::IOContext{IOBuffer})@PlutoRunner.jl:817
show_richest(::IOContext{IOBuffer}, ::Any)@PlutoRunner.jl:600
var"#sprint_withreturned#28"(::IOContext{Base.DevNull}, ::Int64, ::typeof(Main.PlutoRunner.sprint_withreturned), ::Function, ::SciMLBase.EnsembleSolution{Float64, 3, Vector{OrdinaryDiffEq.ODECompositeSolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Matrix{Float64}, SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, OrdinaryDiffEq.CompositeAlgorithm{Tuple{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}}, OrdinaryDiffEq.AutoSwitchCache{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}, Rational{Int64}, Int64}}, OrdinaryDiffEq.CompositeInterpolationData{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, OrdinaryDiffEq.Rosenbrock23Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.Rosenbrock23Tableau{Float64}, SciMLBase.TimeGradientWrapper{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, Matrix{Float64}}, SciMLBase.UJacobianWrapper{SciMLBase.ODEFunction{true, typeof(Main.workspace547.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Float64, Matrix{Float64}}, DiffEqBase.DefaultLinSolve, FiniteDiff.JacobianCache{Vector{Float64}, Vector{Float64}, Vector{Float64}, UnitRange{Int64}, Nothing, Val{:forward}(), Float64}, FiniteDiff.GradientCache{Nothing, Vector{Float64}, Vector{Float64}, Float64, Val{:forward}(), Float64, Val{true}()}}}, OrdinaryDiffEq.AutoSwitchCache{OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.Rosenbrock23{0, false, DiffEqBase.DefaultLinSolve, DataType}, Rational{Int64}, Int64}}}, DiffEqBase.DEStats}}})@PlutoRunner.jl:550
format_output_default(::Any, ::Any)@PlutoRunner.jl:475
#format_output#17@PlutoRunner.jl:492[inlined]
formatted_result_of(::Base.UUID, ::Bool, ::Nothing)@PlutoRunner.jl:417
top-level scope@none:1
@YingboMa do you know if we need a new show or something?
getproperty(::SciMLBase.EnsembleSolution{Float64, 3, Vector{SciMLBase.ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Matrix{Float64}, SciMLBase.ODEFunction{true, typeof(Main.workspace17.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.InterpolationData{SciMLBase.ODEFunction{true, typeof(Main.workspace17.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}}, DiffEqBase.DEStats}}}, ::Symbol)@Base.jl:33
rows(::SciMLBase.EnsembleSolution{Float64, 3, Vector{SciMLBase.ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Matrix{Float64}, SciMLBase.ODEFunction{true, typeof(Main.workspace17.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.InterpolationData{SciMLBase.ODEFunction{true, typeof(Main.workspace17.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}}, DiffEqBase.DEStats}}})@tabletraits.jl:22
table_data(::SciMLBase.EnsembleSolution{Float64, 3, Vector{SciMLBase.ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Matrix{Float64}, SciMLBase.ODEFunction{true, typeof(Main.workspace17.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.InterpolationData{SciMLBase.ODEFunction{true, typeof(Main.workspace17.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}}, DiffEqBase.DEStats}}}, ::IOContext{IOBuffer})@PlutoRunner.jl:827
show_richest(::IOContext{IOBuffer}, ::Any)@PlutoRunner.jl:607
var"#sprint_withreturned#28"(::IOContext{Base.DevNull}, ::Int64, ::typeof(Main.PlutoRunner.sprint_withreturned), ::Function, ::SciMLBase.EnsembleSolution{Float64, 3, Vector{SciMLBase.ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Matrix{Float64}, SciMLBase.ODEFunction{true, typeof(Main.workspace17.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, OrdinaryDiffEq.Tsit5, OrdinaryDiffEq.InterpolationData{SciMLBase.ODEFunction{true, typeof(Main.workspace17.f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}}, DiffEqBase.DEStats}}})@PlutoRunner.jl:557
format_output_default(::Any, ::Any)@PlutoRunner.jl:482
#format_output#17@PlutoRunner.jl:499[inlined]
formatted_result_of(::Base.UUID, ::Bool, ::Nothing)@PlutoRunner.jl:424
top-level scope@none:1
This is the full stack trace.
The problem printing is also messed up.
@fonsp would you happen to know what's different about the Pluto printing system?
Thanks for the example, i'll take a look!
The problem printing is also messed up.
https://github.com/SciML/SciMLBase.jl/pull/30 (though this is unrelated to the original issue)
I am fixing this on the Pluto side: Pluto was trying to use its built-in (interactive 🌈) table viewer to display the EnsembleSolution
, which failed. My fix will be to wrap Pluto's display code in a try
block, and fall back to basic text/plain
display when the table view fails.
The problem is that EnsembleSolution
is a Tables.jl
table with "row access", but calling Tables.rows(sols)
fails. (MWE below.)
(This error caused the Pluto display bug because Pluto used Tables.istable(output) && Tables.rowaccess(output)
to determine that sols
should be displayed using Pluto's built-in table viewer, which internally calls Tables.rows
.)
julia> using DifferentialEquations
julia> f(dx, x, p, t) = (dx .= p*x)
f (generic function with 1 method)
julia> x0 = [1, 0]
2-element Array{Int64,1}:
1
0
julia> A = [0 1; -1.0 -1]
2×2 Array{Float64,2}:
0.0 1.0
-1.0 -1.0
julia> prob = ODEProblem(f, x0, (0.0, 100.0), A)
ODEProblem with uType Array{Int64,1} and tType Float64. In-place: true
timespan: (0.0, 100.0)
u0: [1, 0]
julia> ens_prob = EnsembleProblem(prob;
prob_func = (prob,i,rep) -> (prob.p[2,1] = -rand(); prob),
)
EnsembleProblem with problem ODEProblem
julia> sols = solve(ens_prob; trajectories=100)
EnsembleSolution Solution of length 100 with uType:
OrdinaryDiffEq.ODECompositeSolution{...}
julia> using Tables
julia> Tables.istable(sols)
true
julia> Tables.rowaccess(sols)
true
julia> Tables.rows(sols)
ERROR: type EnsembleSolution has no field prob
Stacktrace:
[1] getproperty(::EnsembleSolution{Float64,3,Array{OrdinaryDiffEq.ODECompositeSolution{...},1}}, ::Symbol) at ./Base.jl:33
[2] rows(::EnsembleSolution{Float64,3,Array{OrdinaryDiffEq.ODECompositeSolution{...},1}}) at /Users/fons/Documents/SciMLBase.jl/src/tabletraits.jl:22
[3] top-level scope at REPL[11]:1
Note that this is from the REPL -- it is not a (Pluto) display problem, but an incomplete implementation of the Tables.jl interface.
Of course, one solution would be to find the source of this bug and fix it. Alternatively, if implementing a tables interface for EnsembleSolution
was never intended, you could either define:
Tables.istable(::EnsembleSolution) = false
# or
Tables.rowaccess(::EnsembleSolution) = false
to tell Tables consumers that Tables.rows(::EnsembleSolution)
is not implemented.
Does https://github.com/SciML/SciMLBase.jl/blob/master/src/tabletraits.jl#L18-L29 not give the row iteration?
It does, but it (erroneously) accesses sol.prob
. It looks like EnsembleSolution
is a collection of solutions, each with its own prob
, i.e. [s.prob for s in sol.u]
. I don't fully understand the context here, but it seems like EnsembleSolution
should not have a 2D table interface?
Oh yes, ensemble is weird. It's an array of tables. If that a table? 🤔 .
Made it not a table.
Sounds like the right solution for now. I suppose that if all trajectories share the same time axis then you could view it as a table, but this might not be worth the effort :)
They don't, so that solves that.
I'm getting an error
Failed to show value: type EnsembleSolution has no field prob
when showingEnsembleSolution
s in Pluto notebooks. It's not a show stopper--I can just put a semicolon to suppress the output--but figured it was something worth mentioning.Possibly related: running the example from the README in the DiffEqUncertainty docs also errors when showing the Koopman expectation in a Pluto notebook. For that one, it looks like it's a missing
has_syms
method.I believe these might both be due to the migration of some things from DiffEqBase to SciMLBase, but I'm not totally sure on that.