Description
Most ArviZ methods call convert_from_inference_data
on the inputs, which allows objects returned by PPLs to be passed directly to these methods. However, there's some flexibility in what groups we might generate from provided objects. e.g. #133 provides a converter from a DynamicPPL.Model
and MCMCChains.Chains
(outputs of Turing modeling), from which most groups can be generated. But a user may not want to generate all groups.
If we add a required_groups
argument to convert_to_inference_data
, then the user could use this to specify which groups are generated from the PPL returns. More usefully, our methods could use it to specify which groups they need, raising a useful error if those groups cannot be generated from inputs. So e.g. loo
would call convert_to_inference_data(input; required_groups=[:log_likelihood])
.
Implementing this would require more complicated wrappers for function we currently forward to Python, but it wouldn't be a lot of work. Then we could merge #133.