From 46afec5660fd7670c8f8860d4316082e5b83cb5a Mon Sep 17 00:00:00 2001 From: Simon Mo Date: Wed, 28 Oct 2020 17:05:42 -0700 Subject: [PATCH] Mute asyncio warning for Serve (#11682) --- python/ray/serve/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/ray/serve/__init__.py b/python/ray/serve/__init__.py index a2c4e9a43..cd27e4907 100644 --- a/python/ray/serve/__init__.py +++ b/python/ray/serve/__init__.py @@ -1,6 +1,11 @@ from ray.serve.api import (accept_batch, Client, connect, start) # noqa: F401 from ray.serve.config import BackendConfig +# Mute the warning because Serve sometimes intentionally calls +# ray.get inside async actors. +import ray.worker +ray.worker.blocking_get_inside_async_warned = True + __all__ = [ "accept_batch", "BackendConfig",