-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Make from_dict
more flexible, and add from_pytree
#2291
Conversation
78b9baf
to
3226ef1
Compare
I'll add that this adds a requirement on dm-tree. I'd rather have used |
Will this affect python 3.12 use? Probably not(?) |
It looks like maybe: google-deepmind/tree#109 I gave google-deepmind/tree#111 a try. |
9cf6832
to
ab36c57
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2291 +/- ##
=======================================
Coverage 86.79% 86.80%
=======================================
Files 123 123
Lines 12722 12743 +21
=======================================
+ Hits 11042 11061 +19
- Misses 1680 1682 +2 ☔ View full report in Codecov by Sentry. |
I tried it out, and it fails when trying to install Given expected workloads in |
Update: The PR was merged for |
Hey! They sneakily added PyPI wheels for 3.12 to dm-tree. I think this is now ready to go. |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
3a563e0
to
f6624ee
Compare
I think this is ready again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It complains about black, so maybe that should be run first
if @OriolAbril approves I think we can merge |
I want to make a patch release before merging, maybe a couple doc changes, then I'll merge. |
Sounds good!
|
I think it should be done now. Docs used to look like this: Now they are this: https://arviz--2291.org.readthedocs.build/en/2291/api/generated/arviz.dict_to_dataset.html |
LGTM!
…On Wed, Mar 13, 2024, 3:16 PM Oriol Abril-Pla ***@***.***> wrote:
I think it should be done now. Docs used to look like this:
Captura.de.pantalla.de.2024-03-13.19-42-15.png (view on web)
<https://github.com/arviz-devs/arviz/assets/23738400/35f4b904-ac37-4805-bb52-37dcf6439f90>
Now they are this:
https://arviz--2291.org.readthedocs.build/en/2291/api/generated/arviz.dict_to_dataset.html
—
Reply to this email directly, view it on GitHub
<#2291 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARQOEH3YJBX5ZB3GZQF5ILYYCQXHAVCNFSM6AAAAAA7LNJR62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJVGQ2TKNBUGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hello, |
Hi @papoteur-mga -- thanks for chiming in, but I'm not sure what this means!
|
Mageia
Python packages are included in the distro to be easily installed, in particular as dependency of any application. The most of the packages are tagged as being open source. These packages should then be built to be sure there are really open source. This is also a way to minimize the risk that faulty code is introduced.
Yes, but I finally found a way by patching the cmake configuration files in dm-tree to use shared libraries. https://svnweb.mageia.org/packages/cauldron/python-dm-tree/current/SOURCES/0001-use-system-libraries.patch?view=markup
I have no idea about that. |
Thank you for the response! Is it right to say you're here to advocate for mageia users, and not (specifically) as a user of statistical diagnostics? I have a particular interest in the functionality that It sounds like maybe this is all set from the patch you added? If it isn't, I can try to explore using some other library to achieve my goals (but I suspect it may introduce more/different problems!) |
This also makes
from_dict
work for nested dictionaries. I joined the keys with double underscores because using a.
would break attribute access (like, it would still work, but you'd useidata.posterior['var.x.y']
, instead ofidata.posterior.var__x__y
)Hopefully this is a no-op for most code, but it should make arviz work automatically with namedtuples or dataclasses.
📚 Documentation preview 📚: https://arviz--2291.org.readthedocs.build/en/2291/