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

compile_pymc creates an 'obs_id' coord #79

Open
jaharvey8 opened this issue Dec 16, 2023 · 4 comments
Open

compile_pymc creates an 'obs_id' coord #79

jaharvey8 opened this issue Dec 16, 2023 · 4 comments

Comments

@jaharvey8
Copy link

I couldn't totally find where this happens but compile_pymc creates an "obs_id" coordinate automatically. If the user doesn't provide that coordinate it gets populated as None. This causes this line of code to throw an error

coords = {name: pd.Index(vals) for name, vals in model.coords.items()}

as pd.Index(vals) is expecting vals to be an array of some kind.

Should we auto-populate the obs_id coordinate as an array of the length of the number of observations?

@ricardoV94
Copy link
Member

I deleted my message above I didn't realize this was the nutpie repo

@ricardoV94
Copy link
Member

@jaharvey8
Copy link
Author

Yeah I realized after posting this that probably what was happening is I specified the "dims" for a distribution as "obs_id" but didn't provide "obs_id" as a coordinate. Pymc automagically handles this behavior. Do we want nutpie to do the same? Or I should just stop doing silly things when specifying the model (in which case we can close this issue)?

@ricardoV94
Copy link
Member

It should either work or raise an informative error

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

No branches or pull requests

2 participants