Open goedman opened 1 year ago
These are updates that would support both :dimarrays (as in read_samples(m, :dimarray)) and inferencedata(m).
read_samples(m, :dimarray)
inferencedata(m)
Currently it still fails:
Testing: test_inferencedata/test_inferencedata.jl. [ Info: /var/folders/pf/2m__rnm54153mj3198b5xxn00000gn/T/jl_g2j5fD/eight_schools.stan updated. InferenceData interface: Error During Test at /Users/rob/.julia/dev/StanSample/test/runtests.jl:89 Got exception outside of a @test LoadError: ArgumentError: Some dims were not found in object Stacktrace: [1] _errorextradims() @ DimensionalData.Dimensions ~/.julia/packages/DimensionalData/6v7CY/src/Dimensions/primitives.jl:649 [2] dimnum @ ~/.julia/packages/DimensionalData/6v7CY/src/Dimensions/primitives.jl:201 [inlined] [3] getcolumn @ ~/.julia/packages/DimensionalData/6v7CY/src/tables.jl:196 [inlined] [4] fromcolumns(x::DimTable{(:draw, :chain, :school, :theta_tilde, :mu, :tau, :theta), Dataset{NamedTuple{(:theta_tilde, :mu, :tau, :theta), Tuple{Array{Float64, 3}, Matrix{Float64}, Matrix{Float64}, Array{Float64, 3}}}, DimStack{NamedTuple{(:theta_tilde, :mu, :tau, :theta), Tuple{Array{Float64, 3}, Matrix{Float64}, Matrix{Float64}, Array{Float64, 3}}}, Tuple{Dim{:draw, DimensionalData.Dimensions.LookupArrays.NoLookup{UnitRange{Int64}}}, Dim{:chain, DimensionalData.Dimensions.LookupArrays.NoLookup{Base.OneTo{Int64}}}, Dim{:school, DimensionalData.Dimensions.LookupArrays.NoLookup{Base.OneTo{Int64}}}}, Tuple{}, NamedTuple{(:theta_tilde, :mu, :tau, :theta), Tuple{Tuple{Dim{:draw, Colon}, Dim{:chain, Colon}, Dim{:school, Colon}}, Tuple{Dim{:draw, Colon}, Dim{:chain, Colon}}, ... <snipped>
This is with InferenceObjects v0.3.4 and DimensionalData v0.24.2.
The error when calling DataFrame on a Dataset is unrelated to InferenceObjects and can be reproduced in DimensionalData itself. I've opened an issue: https://github.com/rafaqz/DimensionalData.jl/issues/459
DataFrame
Dataset
These are updates that would support both :dimarrays (as in
read_samples(m, :dimarray)
) andinferencedata(m)
.Currently it still fails:
This is with InferenceObjects v0.3.4 and DimensionalData v0.24.2.