Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Ray 2.42 support to SDK Client Builder #5027

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions google/cloud/aiplatform/vertex_ray/client_builder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Copyright 2024 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,7 +47,7 @@ def __init__(
persistent_resource_id,
" failed to start Head node properly.",
)
if ray.__version__ == "2.33.0":
if ray.__version__ in ("2.42.0", "2.33.0"):
super().__init__(
dashboard_url=dashboard_uri,
python_version=ray_client_context.python_version,
Expand All @@ -69,7 +69,7 @@ def __init__(
else:
raise ImportError(
f"[Ray on Vertex AI]: Unsupported version {ray.__version__}."
+ "Only 2.33.0 and 2.9.3 are supported."
+ "Only 2.42.0, 2.33.0, and 2.9.3 are supported."
)
self.persistent_resource_id = persistent_resource_id
self.vertex_sdk_version = str(VERTEX_SDK_VERSION)
Expand Down
8 changes: 4 additions & 4 deletions google/cloud/aiplatform/vertex_ray/dashboard_sdk.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Copyright 2024 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,15 +29,15 @@ def get_job_submission_client_cluster_info(
"""A vertex_ray implementation of get_job_submission_client_cluster_info().

Implements
https://github.com/ray-project/ray/blob/ray-2.33.0/python/ray/dashboard/modules/dashboard_sdk.py#L84
https://github.com/ray-project/ray/blob/ray-2.42.0/python/ray/dashboard/modules/dashboard_sdk.py#L84
This will be called in from Ray Job API Python client.

Args:
address: Address without the module prefix `vertex_ray` but otherwise
the same format as passed to ray.init(address="vertex_ray://...").
*args: Reminder of positional args that might be passed down from
*args: Remainder of positional args that might be passed down from
the framework.
**kwargs: Reminder of keyword args that might be passed down from
**kwargs: Remainder of keyword args that might be passed down from
the framework.

Returns:
Expand Down
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,22 @@
preview_extra_require = []

ray_extra_require = [
# Cluster only supports 2.9.3 and 2.33.0. Keep 2.4.0 for our testing environment.
# Cluster only supports 2.9.3, 2.33.0, and 2.42.0. Keep 2.4.0 for our
# testing environment.
# Note that testing is submiting a job in a cluster with Ray 2.9.3 remotely.
(
"ray[default] >= 2.4, <= 2.33.0,!= 2.5.*,!= 2.6.*,!= 2.7.*,!="
"ray[default] >= 2.4, <= 2.42.0,!= 2.5.*,!= 2.6.*,!= 2.7.*,!="
" 2.8.*,!=2.9.0,!=2.9.1,!=2.9.2, !=2.10.*, !=2.11.*, !=2.12.*, !=2.13.*, !="
" 2.14.*, !=2.15.*, !=2.16.*, !=2.17.*, !=2.18.*, !=2.19.*, !=2.20.*, !="
" 2.21.*, !=2.22.*, !=2.23.*, !=2.24.*, !=2.25.*, !=2.26.*, !=2.27.*, !="
" 2.28.*, !=2.29.*, !=2.30.*, !=2.31.*, !=2.32.*; python_version<'3.11'"
" 2.28.*, !=2.29.*, !=2.30.*, !=2.31.*, !=2.32.*, !=2.34.*, !=2.35.*, !="
" 2.36.*, !=2.37.*, !=2.38.*, !=2.39.*, !=2.40.*, !=2.41.*;"
" python_version<'3.11'"
),
# To avoid ImportError: cannot import name 'packaging' from 'pkg_resources'
"setuptools < 70.0.0",
# Ray Data v2.4 in Python 3.11 is broken, but got fixed in Ray v2.5.
"ray[default] >= 2.5, <= 2.33.0; python_version=='3.11'",
"ray[default] >= 2.5, <= 2.42.0; python_version=='3.11'",
"google-cloud-bigquery-storage",
"google-cloud-bigquery",
"pandas >= 1.0.0",
Expand Down