-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Bring back ArviZ wrappers with DeprecationWarnings #4528
Comments
Personally I prefer 1.) because it keeps the ArviZ branding. @AlexAndorra @OriolAbril @rpgoldman what do you think? |
what exactly was supported by wrappers? Only the The main pain point for me related to wrappers is that they used to explicitly import arviz functions, so whenever we rename or remove one of the functions (i.e. hpd to hdi or removing geweke) two things happen: 1) we need to update the pymc codebase to take that into account, 2) old pymc versions that explicitly import the function get broken with latest arviz even though the Note on geweke: we may have deleted geweke too fast and without warning, but the truth is that it had been basically broken for a while and nobody complained. The complains where only about latest arviz breaking pymc 3.8 or 3.9 installation I think it was, which turned out to be the default versions installed on python 3.6 😕 |
The change was released in We can restore |
I like the Something that might make the linking happier would be to add to ArviZ CI some kind of simple test that will identify when changes break the existing stubs. I suppose that could also be used to update the requirements in pymc3 so that upgrades to breaking versions get blocked, or at least a warning? @michaelosthege Isn't it OT: Also, should we be using |
I like |
I think this only makes sense if we keep the old API for |
Having been tripped up by this, I agree that API changes like this should start with a DeprecationWarning. |
Agree with just reverting for the V3. No point in introducing yet another (user facing) change at this point if the point is to just leave this branch in a stable state for the future months. We can do a bit of work to make sure internally the code is not so dependent on arviz name changes (I guess this is what the try/except thing is about?). |
Thanks for the discussion! I think we can safely introduce the new wrapper ( @ricardoV94 yes, I think the old |
What's the point of |
Some, specifically @twiecki, argue that it's a feature that many (beginner) users ask for & that a wrapper is less confusing than having to use a separate library. |
So I'm a bit lost now: is the |
I agree with @twiecki on this point. I spend a lot of time explaining things like this to beginners whose cognitive capacity is completely tapped. Every detail like this that I don't have to explain creates capacity to learn things that matter. |
I'd put the |
Honestly I have nothing against it (specially if it eases maintenance due to naming conflicts), I just doubt it will provide any improved user experience. |
If you ask me the whole aliasing I will use Also I'll open a PR for this issue today or tomorrow. |
Yes, I'm also strongly opposed to And I also couldn't have worded the main motivation better than @ricardoV94 here:
We want to get back to the UI everyone is used to, the UI that is present in hundreds of blog posts, lectures, and books, not introduce yet a new one we have to explain and teach that might again change with |
@twiecki but what does that mean for |
@michaelosthege For |
That way, there's less cognitive overhead for newcomers, we don't have to maintain wrappers, and there's a smooth transition from |
* Restore plots and stats wrappers (see #4528) * Alias stats/plots from ArviZ and add deprecation warnings in old wrappers * Link to ArviZ docs, improve warnings UX * Use intersphinx for docs linking Co-authored-by: Oriol Abril-Pla <[email protected]>
After this issue was resolved for |
Also see pymc-devs#4536 where the wrappers were brought back for v3. Closes pymc-devs#4528
Also see pymc-devs#4536 where the wrappers were brought back for v3. Closes pymc-devs#4528
Also see pymc-devs#4536 where the wrappers were brought back for v3. Closes pymc-devs#4528
@twiecki and I discussed about the bad user experience we accidentally caused by removing ArviZ wrappers.
Many users did not yet upgrade, so we have a chance to fix the UX and ease the transition.
Here's how:
v3
branch we reintroduce the wrappers with the same API they had before. But we addwarnings.warn()
to nudge users towards one of the options beflow.master
andv4
branches we replace the abovewarnings.warn()
with araise DeprecationWarning
. This is better than removing the function entirely, because we can still communicate instructions.Options for future wrappers:
pm.az
: by introducingimport arviz as az
into the PyMC3__init__.py
pm.plotting
: by introducingimport arviz as plotting
into the PyMC3__init__.py
The text was updated successfully, but these errors were encountered: