mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 19:17:01 +08:00
Workaround for passing empty list to ray.wait. (#1043)
* Workaround for passing empty list to ray.wait. * Add test for passing empty list to wait.
This commit is contained in:
committed by
Philipp Moritz
parent
79e013e876
commit
ad61af7333
@@ -2114,6 +2114,12 @@ def wait(object_ids, num_returns=1, timeout=None, worker=global_worker):
|
||||
if worker.mode == PYTHON_MODE:
|
||||
return object_ids[:num_returns], object_ids[num_returns:]
|
||||
|
||||
# TODO(rkn): This is a temporary workaround for
|
||||
# https://github.com/ray-project/ray/issues/997. However, it should be
|
||||
# fixed in Arrow instead of here.
|
||||
if len(object_ids) == 0:
|
||||
return [], []
|
||||
|
||||
object_id_strs = [plasma.ObjectID(object_id.id())
|
||||
for object_id in object_ids]
|
||||
timeout = timeout if timeout is not None else 2 ** 30
|
||||
|
||||
Reference in New Issue
Block a user