We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b90fdb commit 45c47e6Copy full SHA for 45c47e6
sonnet/src/utils.py
@@ -77,7 +77,9 @@ def _decorate_bound_method(*args, **kwargs):
77
argspec = inspect.getfullargspec(f)
78
if argspec.args and argspec.args[0] == "self":
79
80
- @functools.wraps(f)
+ # TODO(b/123870292): Bound methods with multiple decorators can be
81
+ # detected as unbound too, which breaks tf.function usage.
82
+ # Attempt migrating to wrapt instead of using this custom approach.
83
def _decorate_unbound_method(self, *args, **kwargs):
84
bound_method = f.__get__(self, self.__class__) # pytype: disable=attribute-error
85
return decorator_fn(bound_method, self, args, kwargs)
0 commit comments