diff --git a/python/ray/_private/ray_experimental_perf.py b/python/ray/_private/ray_experimental_perf.py index b1b5b634ef4c..d74530ed6959 100644 --- a/python/ray/_private/ray_experimental_perf.py +++ b/python/ray/_private/ray_experimental_perf.py @@ -156,7 +156,12 @@ def _exec(dag, num_args=1, payload_size=1): async def exec_async(tag): async def _exec_async(): fut = await compiled_dag.execute_async(b"x") - await fut + if not isinstance(fut, list): + await fut + else: + # TODO(sang): Right now, it doesn't work with asyncio.gather. + for f in fut: + await f return await asyncio_timeit( tag,