Open rickyyx opened 1 year ago
@zcin Guess this will be ray core's job to make sure this code works. Do you want to assign this to me instead?
@rickyyx Sure. The line directly causing the traceback you listed is not ray core related, though, so https://github.com/ray-project/ray/pull/31608 will fix that
Isn't the root cause ray core retruning corourintes as object references which are not compatible with
async.wait
?Or is there something else I am missing?
Oh I see, the ray core issue is tracked here: https://github.com/ray-project/ray/issues/31606
Isn't the root cause ray core retruning corourintes as object references which are not compatible with
async.wait
? Or is there something else I am missing?
The problem fixed in https://github.com/ray-project/ray/pull/31608 is passing coroutines to asyncio.wait
. The ray core issue is passing object refs to asyncio.wait
, and after https://github.com/ray-project/ray/pull/31608 is applied, running the Serve quickstart will show the ray core issue I think.
Ray Serve quickstart is still broken. Can someone fix the docs/explain what you're supposed to do to get Ray Serve working? Thanks!
Hi, I hit to the same problem with latest package from pip (ray version 2.7.0) and python (version 3.11.4): ray.serve.start(), ray.serve.run() run OK, and have visible/expected counterpart on the dashboard, but when trying to obtain prediction, the model fails with:
> (HTTPProxyActor pid=791) ERROR 2023-10-02 09:47:43,092 http_proxy 172.17.0.3 85adb9a7-94cf-4591-b690-8cb12b6971f9 /mydemo mydemo http_proxy.py:1355 - Passing coroutines is forbidden, use tasks explicitly.
> (HTTPProxyActor pid=791) Traceback (most recent call last):
> (HTTPProxyActor pid=791) File "/opt/conda/lib/python3.11/site-packages/ray/serve/_private/http_proxy.py", line 1342, in send_request_to_replica_streaming
> (HTTPProxyActor pid=791) status_code = await self._consume_and_send_asgi_message_generator(
> (HTTPProxyActor pid=791) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> (HTTPProxyActor pid=791) File "/opt/conda/lib/python3.11/site-packages/ray/serve/_private/http_proxy.py", line 1228, in _consume_and_send_asgi_message_generator
> (HTTPProxyActor pid=791) obj_ref = next_obj_ref_task.result()
> (HTTPProxyActor pid=791) ^^^^^^^^^^^^^^^^^^^^^^^^^^
> (HTTPProxyActor pid=791) File "python/ray/_raylet.pyx", line 387, in _next_async
> (HTTPProxyActor pid=791) File "/opt/conda/lib/python3.11/asyncio/tasks.py", line 415, in wait
> (HTTPProxyActor pid=791) raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
> (HTTPProxyActor pid=791) TypeError: Passing coroutines is forbidden, use tasks explicitly.
> (HTTPProxyActor pid=791) ERROR: ASGI callable returned without starting response.
> (ServeReplica:mydemo:MyModelDeployment pid=843) INFO 2023-10-02 09:47:43,099 MyModelDeployment mydemo#MyModelDeployment#DjSeNn 85adb9a7-94cf-4591-b690-8cb12b6971f9 /mydemo mydemo replica.py:749 - __CALL__ OK 0.2ms
Just seen that "Python 3.11 support is experimental." I guess the default pip package is not for python 3.11 (which comes by default with Debian, and similar distros for some time now). will try other distros with older python version... (python 3.10 seems supported). Fix me if I'm wrong, thanks!
What happened + What you expected to happen
Running serve quick start example from the ray website https://docs.ray.io/en/latest/ray-overview/index.html#ray-ai-runtime-quick-start errors:
Versions / Dependencies
wget
e.g. https://buildkite.com/ray-project/oss-ci-build-pr/builds/8313#01855a61-6528-42d1-b55f-ae0e48ce236a
pip install -U ray-3.0.0.dev0-cp311-cp311-manylinux2014_x86_64.whl
Reproduction script
Ray serve example from quick start
Issue Severity
None