You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to annotatedd haiku modules with jaxtyping type hints, I realized there is a general problem with function wrappers due to using the (semi-deprecated) inspect.getfullargspec in
E.g. when you wrap the __init__ of a haiku module with a type checker then this call produces an error due to missing signature information (getfullargspec does not follow the full __wrapped__-chain).
See this PR to jaxtyping. As discussed with @patrick-kidger this seems to be a bug/incompatibility issue at the haiku side rather than forcing wrapper libraries to hard-patch a __signature__ attribute.
The text was updated successfully, but these errors were encountered:
When trying to annotatedd
haiku
modules with jaxtyping type hints, I realized there is a general problem with function wrappers due to using the (semi-deprecated)inspect.getfullargspec
inhttps://github.com/deepmind/dm-haiku/blob/2664390c3df8af703b87bf62059eda25ca5eff57/haiku/_src/utils.py#L66
E.g. when you wrap the
__init__
of a haiku module with a type checker then this call produces an error due to missing signature information (getfullargspec
does not follow the full__wrapped__
-chain).https://github.com/deepmind/dm-haiku/blob/2664390c3df8af703b87bf62059eda25ca5eff57/haiku/_src/module.py#L126
See this PR to jaxtyping. As discussed with @patrick-kidger this seems to be a bug/incompatibility issue at the
haiku
side rather than forcing wrapper libraries to hard-patch a__signature__
attribute.The text was updated successfully, but these errors were encountered: