[dask-on-ray] Convert tuple of object refs to list before ray.get() call. (#11582)

This commit is contained in:
Clark Zinzow
2020-10-23 16:39:22 -07:00
committed by GitHub
parent d3405e74da
commit 0979589c7c
2 changed files with 14 additions and 3 deletions
+5 -3
View File
@@ -346,9 +346,11 @@ def ray_get_unpack(object_refs):
The input Python object with all contained Ray object references
resolved with their concrete values.
"""
if isinstance(object_refs,
(tuple, list)) and any(not isinstance(x, ray.ObjectRef)
for x in object_refs):
if isinstance(object_refs, tuple):
object_refs = list(object_refs)
if isinstance(object_refs, list) and any(not isinstance(x, ray.ObjectRef)
for x in object_refs):
# We flatten the object references before calling ray.get(), since Dask
# loves to nest collections in nested tuples and Ray expects a flat
# list of object references. We repack the results after ray.get()