-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fixing keyword args in top-level pm.compile_fn #5865
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
`Model.compile_fn` requires all parameters except `outs` to be keyword arguments so the top level `compile_fn` didn't work as written.
Codecov Report
@@ Coverage Diff @@
## main #5865 +/- ##
==========================================
- Coverage 89.48% 85.78% -3.71%
==========================================
Files 73 73
Lines 13225 13225
==========================================
- Hits 11835 11345 -490
- Misses 1390 1880 +490
|
Maybe add a test? |
This wasn't previously tested (hence why the bug existed!) so I'd say that that's beyond the scope of my PR, but if someone else wants to, that would be cool. |
Yeah we should test, so we weren't calling this function anywhere? It doesn't need to be you if you don't want to ofc. Thanks for opening the PR |
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.
Thanks @dfm!
Wait until we see if the test executes - I just wrote it on the GitHub UI :D |
test_vals = np.array([0.0, -1.0]) | ||
state = {"x": test_vals, "y_log__": test_vals} | ||
|
||
for target in [x, y]: |
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 don't think that should be the case :P (that it only accepts one output). Did we introduce that constraint somewhere by accident?
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 sure - it's still not working with a strange error message!
I'm not sure why my proposed test isn't working, but I'll close this PR and just open an issue and someone else can deal with it because I don't have time! My proposed 5 character change fixes things in my case but YMMV :D |
Model.compile_fn
requires all parameters exceptouts
to be keyword arguments so the top levelcompile_fn
didn't work as written.Thank your for opening a PR!
Before you proceed, please make sure that the pre-commit linting/style checks pass.
Depending on what your PR does, here are a few things you might want to address in the description: