Skip to content

Commit

Permalink
RHOAIENG-12192 - Extend DSP e2e tests (#2129)
Browse files Browse the repository at this point in the history
Move pipeline tests related to Distributed Workloads to Workloads
Orchestration folder and add a new test "Verify Ods Users Can Create And
Run A Data Science Pipeline With Ray Job Using The kfp Python Package".
  • Loading branch information
jiripetrlik authored Dec 18, 2024
2 parents 40fcc9e + c5546a0 commit 1ad1975
Show file tree
Hide file tree
Showing 6 changed files with 774 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@


# image and the sdk has a fixed value because the version matters
@dsl.component(packages_to_install=["codeflare-sdk==0.21.1"], base_image=common_base_image)
@dsl.component(packages_to_install=["codeflare-sdk==v0.24.0"], base_image=common_base_image)
def ray_fn() -> int:
import ray # noqa: PLC0415
from codeflare_sdk import generate_cert # noqa: PLC0415
from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration # noqa: PLC0415
from codeflare_sdk.ray.cluster import Cluster, ClusterConfiguration # noqa: PLC0415

cluster = Cluster(
ClusterConfiguration(
Expand All @@ -24,7 +24,7 @@ def ray_fn() -> int:
worker_cpu_limits=1,
worker_memory_requests=1,
worker_memory_limits=2,
image="quay.io/modh/ray:2.35.0-py39-cu121",
image="quay.io/modh/ray@sha256:0d715f92570a2997381b7cafc0e224cfa25323f18b9545acfd23bc2b71576d06",
verify_tls=False
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ deploymentSpec:
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.10.1'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.11.0'\
\ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' &&\
\ python3 -m pip install --quiet --no-warn-script-location 'codeflare-sdk==0.21.1'\
\ python3 -m pip install --quiet --no-warn-script-location 'codeflare-sdk==v0.24.0'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand All @@ -38,14 +38,14 @@ deploymentSpec:
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef ray_fn() -> int:\n import ray # noqa: PLC0415\n from codeflare_sdk\
\ import generate_cert # noqa: PLC0415\n from codeflare_sdk.cluster.cluster\
\ import generate_cert # noqa: PLC0415\n from codeflare_sdk.ray.cluster\
\ import Cluster, ClusterConfiguration # noqa: PLC0415\n\n cluster =\
\ Cluster(\n ClusterConfiguration(\n name=\"raytest\"\
,\n num_workers=1,\n head_cpu_requests=1,\n \
\ head_cpu_limits=1,\n head_memory_requests=4,\n \
\ head_memory_limits=4,\n worker_cpu_requests=1,\n \
\ worker_cpu_limits=1,\n worker_memory_requests=1,\n \
\ worker_memory_limits=2,\n image=\"quay.io/modh/ray:2.35.0-py39-cu121\"\
\ worker_memory_limits=2,\n image=\"quay.io/modh/ray@sha256:0d715f92570a2997381b7cafc0e224cfa25323f18b9545acfd23bc2b71576d06\"\
,\n verify_tls=False\n )\n )\n\n # always clean\
\ the resources\n cluster.down()\n print(cluster.status())\n cluster.up()\n\
\ cluster.wait_ready()\n print(cluster.status())\n print(cluster.details())\n\
Expand Down Expand Up @@ -76,4 +76,4 @@ root:
taskInfo:
name: ray-fn
schemaVersion: 2.1.0
sdkVersion: kfp-2.10.1
sdkVersion: kfp-2.11.0
Loading

0 comments on commit 1ad1975

Please sign in to comment.