Skip to content

Updated Ray version to 2.20.0 #530

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

Merged
merged 3 commits into from
Jun 19, 2024
Merged
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
279 changes: 103 additions & 176 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ homepage = "https://github.com/project-codeflare/codeflare-sdk"
keywords = ['codeflare', 'python', 'sdk', 'client', 'batch', 'scale']

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.9"
openshift-client = "1.0.18"
rich = "^12.5"
ray = {version = "2.7.0", extras = ["data", "default"]}
ray = {version = "2.20.0", extras = ["data", "default"]}
kubernetes = ">= 25.3.0, < 27"
codeflare-torchx = "0.6.0.dev2"
cryptography = "40.0.2"
Expand Down
6 changes: 3 additions & 3 deletions src/codeflare_sdk/templates/base-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
namespace: default
spec:
# The version of Ray you are using. Make sure all Ray containers are running this version of Ray.
rayVersion: '2.7.0'
rayVersion: '2.20.0'
# If enableInTreeAutoscaling is true, the autoscaler sidecar will be added to the Ray head pod.
# Ray autoscaler integration is supported only for Ray versions >= 1.11.0
# Ray autoscaler integration is Beta with KubeRay >= 0.3.0 and Ray >= 2.0.0.
Expand Down Expand Up @@ -69,7 +69,7 @@ spec:
containers:
# The Ray head pod
- name: ray-head
image: quay.io/project-codeflare/ray:latest-py39-cu118
image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
imagePullPolicy: Always
ports:
- containerPort: 6379
Expand Down Expand Up @@ -152,7 +152,7 @@ spec:
spec:
containers:
- name: machine-learning # must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc'
image: quay.io/project-codeflare/ray:latest-py39-cu118
image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
# environment variables to set in the container.Optional.
# Refer to https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/
lifecycle:
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def get_ray_image():
default_ray_image = "quay.io/project-codeflare/ray:latest-py39-cu118"
default_ray_image = "quay.io/project-codeflare/ray:2.20.0-py39-cu118"
return os.getenv("RAY_IMAGE", default_ray_image)


Expand Down
6 changes: 3 additions & 3 deletions tests/test-case-bad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
image: quay.io/project-codeflare/ray:latest-py39-cu118
image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
imagePullPolicy: Always
lifecycle:
preStop:
Expand All @@ -68,7 +68,7 @@ spec:
cpu: 2
memory: 8G
nvidia.com/gpu: 0
rayVersion: 1.12.0
rayVersion: 2.20.0
workerGroupSpecs:
- groupName: small-group-unit-test-cluster
maxReplicas: 2
Expand All @@ -90,7 +90,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
image: quay.io/project-codeflare/ray:latest-py39-cu118
image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
lifecycle:
preStop:
exec:
Expand Down
6 changes: 3 additions & 3 deletions tests/test-case-no-mcad.yamls
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
template:
spec:
containers:
- image: quay.io/project-codeflare/ray:latest-py39-cu118
- image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
imagePullPolicy: Always
lifecycle:
preStop:
Expand Down Expand Up @@ -89,7 +89,7 @@ spec:
name: odh-trusted-ca-bundle
optional: true
name: odh-ca-cert
rayVersion: 2.7.0
rayVersion: 2.20.0
workerGroupSpecs:
- groupName: small-group-unit-test-cluster-ray
maxReplicas: 2
Expand All @@ -106,7 +106,7 @@ spec:
key: value
spec:
containers:
- image: quay.io/project-codeflare/ray:latest-py39-cu118
- image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
lifecycle:
preStop:
exec:
Expand Down
6 changes: 3 additions & 3 deletions tests/test-case.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
template:
spec:
containers:
- image: quay.io/project-codeflare/ray:latest-py39-cu118
- image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
imagePullPolicy: Always
lifecycle:
preStop:
Expand Down Expand Up @@ -94,7 +94,7 @@ spec:
name: odh-trusted-ca-bundle
optional: true
name: odh-ca-cert
rayVersion: 2.7.0
rayVersion: 2.20.0
workerGroupSpecs:
- groupName: small-group-unit-test-cluster
maxReplicas: 2
Expand All @@ -111,7 +111,7 @@ spec:
key: value
spec:
containers:
- image: quay.io/project-codeflare/ray:latest-py39-cu118
- image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
lifecycle:
preStop:
exec:
Expand Down
6 changes: 3 additions & 3 deletions tests/test-default-appwrapper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
template:
spec:
containers:
- image: quay.io/project-codeflare/ray:latest-py39-cu118
- image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
imagePullPolicy: Always
lifecycle:
preStop:
Expand Down Expand Up @@ -93,7 +93,7 @@ spec:
name: odh-trusted-ca-bundle
optional: true
name: odh-ca-cert
rayVersion: 2.7.0
rayVersion: 2.20.0
workerGroupSpecs:
- groupName: small-group-unit-test-default-cluster
maxReplicas: 1
Expand All @@ -110,7 +110,7 @@ spec:
key: value
spec:
containers:
- image: quay.io/project-codeflare/ray:latest-py39-cu118
- image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
lifecycle:
preStop:
exec:
Expand Down
6 changes: 3 additions & 3 deletions tests/unit-test-volume-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
template:
spec:
containers:
- image: quay.io/project-codeflare/ray:latest-py39-cu118
- image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
imagePullPolicy: Always
lifecycle:
preStop:
Expand Down Expand Up @@ -102,7 +102,7 @@ spec:
- name: test3
secret:
secretName: test-secret
rayVersion: 2.7.0
rayVersion: 2.20.0
workerGroupSpecs:
- groupName: small-group-unit-test-volume-cluster
maxReplicas: 1
Expand All @@ -119,7 +119,7 @@ spec:
key: value
spec:
containers:
- image: quay.io/project-codeflare/ray:latest-py39-cu118
- image: quay.io/project-codeflare/ray:2.20.0-py39-cu118
lifecycle:
preStop:
exec:
Expand Down
24 changes: 12 additions & 12 deletions tests/unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_config_creation():
assert config.min_cpus == 3 and config.max_cpus == 4
assert config.min_memory == "5G" and config.max_memory == "6G"
assert config.num_gpus == 7
assert config.image == "quay.io/project-codeflare/ray:latest-py39-cu118"
assert config.image == "quay.io/project-codeflare/ray:2.20.0-py39-cu118"
assert config.template == f"{parent}/src/codeflare_sdk/templates/base-template.yaml"
assert config.machine_types == ["cpu.small", "gpu.large"]
assert config.image_pull_secrets == ["unit-test-pull-secret"]
Expand Down Expand Up @@ -400,7 +400,7 @@ def test_cluster_creation_no_mcad_local_queue(mocker):
num_gpus=7,
machine_types=["cpu.small", "gpu.large"],
image_pull_secrets=["unit-test-pull-secret"],
image="quay.io/project-codeflare/ray:latest-py39-cu118",
image="quay.io/project-codeflare/ray:2.20.0-py39-cu118",
write_to_file=True,
appwrapper=False,
local_queue="local-queue-default",
Expand Down Expand Up @@ -428,7 +428,7 @@ def test_default_cluster_creation(mocker):
)
default_config = ClusterConfiguration(
name="unit-test-default-cluster",
image="quay.io/project-codeflare/ray:latest-py39-cu118",
image="quay.io/project-codeflare/ray:2.20.0-py39-cu118",
appwrapper=True,
)
cluster = Cluster(default_config)
Expand Down Expand Up @@ -493,7 +493,7 @@ def test_cluster_with_custom_volumes(mocker):

test_config = ClusterConfiguration(
name="unit-test-volume-cluster",
image="quay.io/project-codeflare/ray:latest-py39-cu118",
image="quay.io/project-codeflare/ray:2.20.0-py39-cu118",
volume_mounts=volume_mounts,
volumes=volumes,
)
Expand Down Expand Up @@ -839,7 +839,7 @@ def test_ray_job_wrapping(mocker):
return_value=get_local_queue("kueue.x-k8s.io", "v1beta1", "ns", "localqueues"),
)
cluster = cluster = createClusterWithConfig(mocker)
cluster.config.image = "quay.io/project-codeflare/ray:latest-py39-cu118"
cluster.config.image = "quay.io/project-codeflare/ray:2.20.0-py39-cu118"
mocker.patch(
"ray.job_submission.JobSubmissionClient._check_connection_and_version_with_url",
return_value="None",
Expand Down Expand Up @@ -959,7 +959,7 @@ def test_ray_details(mocker, capsys):
ClusterConfiguration(
name="raytest2",
namespace="ns",
image="quay.io/project-codeflare/ray:latest-py39-cu118",
image="quay.io/project-codeflare/ray:2.20.0-py39-cu118",
write_to_file=True,
appwrapper=True,
local_queue="local_default_queue",
Expand Down Expand Up @@ -1245,7 +1245,7 @@ def get_ray_obj(group, version, namespace, plural, cls=None):
},
},
},
"rayVersion": "2.7.0",
"rayVersion": "2.20.0",
"workerGroupSpecs": [
{
"groupName": "small-group-quicktest",
Expand Down Expand Up @@ -1479,7 +1479,7 @@ def get_ray_obj(group, version, namespace, plural, cls=None):
}
},
},
"rayVersion": "1.12.0",
"rayVersion": "2.20.0",
"workerGroupSpecs": [
{
"groupName": "small-group-quicktest2",
Expand Down Expand Up @@ -1852,7 +1852,7 @@ def get_aw_obj(group, version, namespace, plural):
}
},
},
"rayVersion": "1.12.0",
"rayVersion": "2.20.0",
"workerGroupSpecs": [
{
"groupName": "small-group-quicktest",
Expand Down Expand Up @@ -2352,7 +2352,7 @@ def test_cluster_status(mocker):
ClusterConfiguration(
name="test",
namespace="ns",
image="quay.io/project-codeflare/ray:latest-py39-cu118",
image="quay.io/project-codeflare/ray:2.20.0-py39-cu118",
write_to_file=True,
appwrapper=True,
local_queue="local_default_queue",
Expand Down Expand Up @@ -2447,7 +2447,7 @@ def test_wait_ready(mocker, capsys):
ClusterConfiguration(
name="test",
namespace="ns",
image="quay.io/project-codeflare/ray:latest-py39-cu118",
image="quay.io/project-codeflare/ray:2.20.0-py39-cu118",
write_to_file=True,
appwrapper=True,
local_queue="local-queue-default",
Expand Down Expand Up @@ -2674,7 +2674,7 @@ def throw_if_getting_raycluster(group, version, namespace, plural):
cluster = Cluster(
ClusterConfiguration(
"test_cluster",
image="quay.io/project-codeflare/ray:latest-py39-cu118",
image="quay.io/project-codeflare/ray:2.20.0-py39-cu118",
write_to_file=False,
)
)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_test_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def createClusterConfig():
appwrapper=True,
machine_types=["cpu.small", "gpu.large"],
image_pull_secrets=["unit-test-pull-secret"],
image="quay.io/project-codeflare/ray:latest-py39-cu118",
image="quay.io/project-codeflare/ray:2.20.0-py39-cu118",
write_to_file=True,
)
return config
Expand Down