Skip to content

Commit 2e5e353

Browse files
authored
[BugFix] AttributeError in accept_remote_rref_udf_invocation (#3168)
1 parent b42b19f commit 2e5e353

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torchrl/_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ def accept_remote_rref_udf_invocation(decorated_class):
410410
"""Class decorator that applies `accept_remote_rref_invocation` to all public methods."""
411411
# ignores private methods
412412
for name in dir(decorated_class):
413-
method = getattr(decorated_class, name)
413+
method = getattr(decorated_class, name, None)
414+
if method is None:
415+
continue
414416
if callable(method) and not name.startswith("_"):
415417
setattr(decorated_class, name, accept_remote_rref_invocation(method))
416418
return decorated_class

0 commit comments

Comments
 (0)