ray-project / ray

Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
31.9k stars 5.44k forks source link

[python 3.12][serve] fix tests for python 3.12 #46218

Open can-anyscale opened 5 days ago

can-anyscale commented 5 days ago

Description

Working branch: https://github.com/ray-project/ray/tree/ray-py312 Test failures: https://docs.google.com/spreadsheets/d/1VIpZdrp24CiWkI13EE__REIFlVn0lDiSBLuCN5cyOP8

zcin commented 2 days ago

seems like no serve test failures?

can-anyscale commented 2 days ago

w00t sorry for the wrong link, there are a fews (<10 test failures) for serve here: https://docs.google.com/spreadsheets/d/1VIpZdrp24CiWkI13EE__REIFlVn0lDiSBLuCN5cyOP8/edit?gid=1656986472#gid=1656986472

you can only see it on the feature branch https://github.com/ray-project/ray/tree/ray-py312

zcin commented 2 days ago

For test_deploy_2, test_cli, and test_api the failures are all runtime environment setup failures:

Could not create the actor because its associated runtime env failed to be created.
Traceback (most recent call last):
  File "/rayci/python/ray/_private/runtime_env/agent/runtime_env_agent.py", line 393, in _create_runtime_env_with_retry
    runtime_env_context = await asyncio.wait_for(
                          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/rayci/python/ray/_private/runtime_env/agent/runtime_env_agent.py", line 354, in _setup_runtime_env
    await create_for_plugin_if_needed(
  File "/rayci/python/ray/_private/runtime_env/plugin.py", line 254, in create_for_plugin_if_needed
    size_bytes = await plugin.create(uri, runtime_env, context, logger=logger)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/rayci/python/ray/_private/runtime_env/pip.py", line 388, in _run
    await self._create_or_get_virtualenv(path, exec_cwd, logger)
  File "/rayci/python/ray/_private/runtime_env/pip.py", line 330, in _create_or_get_virtualenv
    await check_output_cmd(create_venv_cmd, logger=logger, cwd=cwd, env=env)
  File "/rayci/python/ray/_private/runtime_env/utils.py", line 105, in check_output_cmd
    raise SubprocessCalledProcessError(
ray._private.runtime_env.utils.SubprocessCalledProcessError: Run cmd[3] failed with the following details.
Command '[\'/opt/miniconda/bin/python3\', \'-m\', \'virtualenv\', \'--app-data\', \'/tmp/ray/session_2024-06-09_23-48-19_450426_115400/runtime_resources/pip/441e12a8304cb7e0b079e84ce3fd2d44071ce4b1/virtualenv_app_data\', \'--reset-app-data\', \'--no-periodic-update\', \'--system-site-packages\', \'--no-download\', \'/tmp/ray/session_2024-06-09_23-48-19_450426_115400/runtime_resources/pip/441e12a8304cb7e0b079e84ce3fd2d44071ce4b1/virtualenv\']' returned non-zero exit status 1.
Last 50 lines of stdout:
    AttributeError: module 'virtualenv.create.via_global_ref.builtin.cpython.mac_os' has no attribute 'CPython3macOsBrew'

They should pass once this is fixed in core.

can-anyscale commented 2 days ago

oh sorry, the one with GREEN color are fixed already; you only need to investigate the one with yellow and red colors