Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inferencedata dimarray tests #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

goedman
Copy link
Collaborator

@goedman goedman commented Feb 18, 2023

These are updates that would support both :dimarrays (as in read_samples(m, :dimarray)) and 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.

@sethaxen
Copy link
Contributor

The error when calling DataFrame on a Dataset is unrelated to InferenceObjects and can be reproduced in DimensionalData itself. I've opened an issue: rafaqz/DimensionalData.jl#459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants