-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fixed UserWarning when converting sample_stats to idata #7979
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
base: main
Are you sure you want to change the base?
Conversation
|
Can anyone explain how to fix these checks? |
|
Both of the requirements.txt files should not be manually edited (see comment at top of the file). If you need to add dependencies, change conda-envs/environment-dev.yml |
|
I'm not sure what's the status of arviz-base and if it's stable enough to switch as a dependency. This would probably require a major PyMC version bump as well? CC @OriolAbril and @aloctavodia |
|
In general we could begin a migration to "New ArviZ", but to reduce friction, we should do it in a coordinated manner and change arviz imports everywhere, not just here. It may be a good idea to have a dedicated PyMC release to work on the transition. In particular, about this PR, |
|
I will take a closer look in the coming days but it looks good. We can have both arviz and arviz-base installed together without problem and I think doing that doesn't require a major version because for the most part, users won't really notice any change. In this case it is only a switch between the two The main things to comment are trying to switch as many imports as possible to arviz-base instead of combining arviz-base and arviz.data imports in the same file. And requiring arviz-base newer than 0.7 |
Description
This PR aims to close #7821. Previously, in some cases, running
pm.sample_smc()resulted in a UserWarning being generated:What I did was update the
dict_to_dataset()function call(s) inpymc/backends/arviz.pyandpymc/smc/sampling.py. Inpymc/backends/arviz.py, I changed the import statement so thatdict_to_dataset()was imported fromarviz_baserather thanarviz.data.base, and the rest of the changes just involved updating the function call. Another important detail is that inpymc/smc/sampling/py, I added another argument when callingdict_to_dataset, which issample_dims=["chain"], since the variablesample_stats_dictwas a 1-D dict.Related Issue
Checklist
Type of change