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

Add required_groups argument to convert_to_inference_data #190

Open
sethaxen opened this issue Jun 13, 2022 · 0 comments
Open

Add required_groups argument to convert_to_inference_data #190

sethaxen opened this issue Jun 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sethaxen
Copy link
Member

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.

@sethaxen sethaxen added the enhancement New feature or request label Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant