-
Notifications
You must be signed in to change notification settings - Fork 226
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
hk.Module should be an abstract Callable #52
Comments
Thanks for the FR! In Haiku we don't special case It is common for modules to be callable of course, and we have considered adding Using We're keen where possible to encourage JAX code to be decoupled from Haiku, we feel that overall this is best for the ecosystem and users will not be locked into a particular way of using JAX by our libraries. Concretely, if you're thinking about requiring |
I see. What you are saying makes sense in that context. On my side I am creating a framework on top of Haiku so I have to assume that users will create a generic callable Thanks! |
Hey, I use
pyright
/pylance
for type checking and they are pretty unhappy thathk.Module
doesn't define and abstract__call__
method, I get type errors all over the place when defining code that take arbitraryhk.Module
s. Given most of Haiku is already typed this would be a nice addition.The text was updated successfully, but these errors were encountered: