-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Description
I have a gather Actor which takes all outputs of previous Actor:
@ray.remote
class GatherAll:
def __init__(self) -> None:
pass
# def infer(self, hands, kpts):
# if hands.shape[0] > kpts.shape[0]:
# out = hands.copy()
# out[:kpts.shape[0], :] += kpts[..., :4]
# return out
# else:
# out = kpts.copy()[..., :4]
# out[:hands.shape[0], :] += hands
# return out
def infer(self, datas):
hands = datas['a']
kpts = datas['b']
if hands.shape[0] > kpts.shape[0]:
out = hands.copy()
out[:kpts.shape[0], :] += kpts[..., :4]
return out
else:
out = kpts.copy()[..., :4]
out[:hands.shape[0], :] += hands
return out
the uncommented parts not work, which I call it in dict:
# out = G.infer.remote(hands, kpts)
out = G.infer.remote({'a': hands, 'b': kpts})
Get error:
AttributeError: 'ray._raylet.ObjectRef' object has no attribute 'shape'
Why using separated is OK, but dictionary is not ? Very confused here.
Metadata
Metadata
Assignees
Labels
No labels