-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix 'model' and 'aesara_config' kwargs for pm.Model #5915
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
Conversation
I don't think we are using that anywhere...? All functions that end up compiling stuff accept |
Meaning we should just remove it if it is indeed never used. |
I tried to run VI using Jax and failed to do so (couple of more issues to be solved), I hoped this method would work for me as it was implemented in v3. |
I just know it was removed because of the release notes. I don't know how it was used before and I don't remember seeing it being used anywhere in the library since I started working on it. You can of course use JAX or NUMBA by setting the global aesara compile flag or passing |
Codecov Report
@@ Coverage Diff @@
## main #5915 +/- ##
==========================================
- Coverage 89.50% 81.83% -7.67%
==========================================
Files 73 73
Lines 13276 13275 -1
==========================================
- Hits 11883 10864 -1019
- Misses 1393 2411 +1018
|
I was referring to this line: Line 125 in 121a5ae
But maybe it was just renamed, not removed? I see it is used in the ContextMeta |
I failed to find an issue about this change. Neither removing model nor aesara/theano_config. |
Oh, another query gave this: #4981 |
Do you think that was a misunderstanding (ignoring the |
The arguments might seem to be unused, but they are passed to |
Yeah, it seems to be the case, and your new tests clearly show it has an effect. |
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.
Is __new__
automatically called before __init__
???
The theano_config
kwarg was intentionally removed without replacement. It looks like it was forgotten to make changes in __new__
.
We should
- either re-introduce the kwargs in
__init__
while raising aTypeError
with instructions to use Aesara config functions directly (like we do in tests) - XOR remove it also from
__new__
Yes, it is called before |
+1 for less magic stuff behind the scenes |
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.
I'm not a fan of keeping an API that is seldom used, but it looks like the removal was incomplete and this PR fixes it.
At some point we might want to remove aesara_config
entirely, but that's out of scope for now.
So let's merge this in order to get 4.1.0
over the finish line?
Fixes
and