From e92d7465338ccff0a50e055aa6d6888d6a331a63 Mon Sep 17 00:00:00 2001 From: SangBin Cho Date: Mon, 16 Sep 2024 08:27:34 -0700 Subject: [PATCH 1/2] fixed --- python/ray/_private/ray_experimental_perf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/ray/_private/ray_experimental_perf.py b/python/ray/_private/ray_experimental_perf.py index b1b5b634ef4c..2cc890986755 100644 --- a/python/ray/_private/ray_experimental_perf.py +++ b/python/ray/_private/ray_experimental_perf.py @@ -1,5 +1,6 @@ """This is the script for `ray microbenchmark`.""" +import asyncio import logging from ray._private.ray_microbenchmark_helpers import timeit, asyncio_timeit import multiprocessing @@ -156,7 +157,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, From b09e63454f1e9f0d55c00d684ff8fc852eeb4401 Mon Sep 17 00:00:00 2001 From: SangBin Cho Date: Mon, 16 Sep 2024 08:27:49 -0700 Subject: [PATCH 2/2] ip --- python/ray/_private/ray_experimental_perf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python/ray/_private/ray_experimental_perf.py b/python/ray/_private/ray_experimental_perf.py index 2cc890986755..d74530ed6959 100644 --- a/python/ray/_private/ray_experimental_perf.py +++ b/python/ray/_private/ray_experimental_perf.py @@ -1,6 +1,5 @@ """This is the script for `ray microbenchmark`.""" -import asyncio import logging from ray._private.ray_microbenchmark_helpers import timeit, asyncio_timeit import multiprocessing