Skip to content

Commit

Permalink
[dashboard][perf] Change ray.get to await in dashboard async. (ray-pr…
Browse files Browse the repository at this point in the history
…oject#45047)

You should not use `ray.get` in async context.

Signed-off-by: Ruiyang Wang <[email protected]>
  • Loading branch information
rynewang authored Apr 30, 2024
1 parent 89a6393 commit e508b3e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dashboard/modules/data/data_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
PrometheusQueryError,
)
from urllib.parse import quote
import ray
import logging

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -62,7 +61,7 @@ async def get_datasets(self, req: Request) -> Response:
from ray.data._internal.stats import _get_or_create_stats_actor

_stats_actor = _get_or_create_stats_actor()
datasets = ray.get(_stats_actor.get_datasets.remote(job_id))
datasets = await _stats_actor.get_datasets.remote(job_id)
# Initializes dataset metric values
for dataset in datasets:
for metric, queries in DATASET_METRICS.items():
Expand Down

0 comments on commit e508b3e

Please sign in to comment.