-
Notifications
You must be signed in to change notification settings - Fork 44
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
chex.variants(with_pmap=True) ignores static_argnames
#115
Comments
Hi, I would like to work on this issue if no one else has picked it up. Thanks! |
Hi @fvisin, thanks for opening this issue.
Re: checking |
...how did I miss that!? Apologies for the noise 🤦
That makes sense. Do you think it would be reasonable to fail with a more specific error message when |
That's a good point! We can prohibit users from using both |
That's also a good idea, but I don't think it would have solved my specific case! I was setting only |
Ah I see, it all makes sense now, TY! @broper2 are you interested in preparing the fix? |
Thanks @hbq1, will get this PR up within the week. |
Hi @hbq1, dont want to leave you hanging...but I have had some other stuff come up. May be best to have someone else take this issue and prepare the PR. |
NP, thanks for letting me know @broper2! |
The
_with_pmap
function acceptsstatic_argnums
as a parameter, but notstatic_argnames
. This is inconsistent with other variants, such aswith_jit
andwith_device
. Crucially, this prevents to test methods that require to pass arguments by name (e.g., Distrax's Distribution.sample())More generally, it would be best if all variants accepted the same parameters where possible (i.e., where not specific to a single variant) and I would suggest to check all keys in
**unused_kwargs
against a list of allowed parameters (i.e., the union of the parameters of all variant functions) to prevent silent errors due to e.g., misspells.The text was updated successfully, but these errors were encountered: