Skip to content

Commit

Permalink
Fix model mesh tests and update runtime images (#2060)
Browse files Browse the repository at this point in the history
* Update model mesh deploymenet from ui

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* add raw and serverless

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* add raw and serverless

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* fix tests

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* fix tests

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* fix tests

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* update images

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* fix tests and code

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* use cli project deletion

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* use cli project deletion

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

* remove parenthasis

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
  • Loading branch information
rnetser authored Nov 27, 2024
1 parent d6fea92 commit 8cfdd75
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 57 deletions.
2 changes: 1 addition & 1 deletion ods_ci/tests/Resources/CLI/DSProjects/DSProjects.resource
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Delete All DS Projects With Name Like
Log List of DS Projects to be deleted: @{dsp_list} console=yes
FOR ${dsp_name} IN @{dsp_list}
${return_code}= Run And Return Rc
... oc delete project ${dsp_name}
... oc delete project ${dsp_name} --force
Should Be Equal As Integers ${return_code} 0 msg=Error deleting DS Project ${dsp_name}
END
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
name: caikit
containers:
- name: kserve-container
image: quay.io/modh/text-generation-inference@sha256:28a15bf3dce43753a78e7b1b89ac40ef54dd4e2f1c103667daee009725cc2562
image: quay.io/modh/text-generation-inference@sha256:bb36bb41cc744a8ff94d537f74c228e8b4e17c2468c50ccd89fc21ecc3940a70
command: ["text-generation-launcher"]
args: ["--model-name=/mnt/models/artifacts/"]
env:
Expand All @@ -23,7 +23,7 @@ spec:
## Note: cannot add readiness/liveness probes to this container because knative will refuse them.
# multi-container probing will be available after https://github.com/knative/serving/pull/14853 is merged
- name: transformer-container
image: quay.io/modh/caikit-tgis-serving@sha256:5350ac5f5883b7072296edf8583279ffe2b37c737d59f999c26f5f03bb7889bf
image: quay.io/modh/caikit-tgis-serving@sha256:fe0d1f1233d0b056ca7c690f765b20611e20837465674998e3d293df9b95e838
env:
- name: RUNTIME_LOCAL_MODELS_DIR
value: /mnt/models
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
name: caikit
containers:
- name: kserve-container
image: quay.io/modh/text-generation-inference@sha256:28a15bf3dce43753a78e7b1b89ac40ef54dd4e2f1c103667daee009725cc2562
image: quay.io/modh/text-generation-inference@sha256:bb36bb41cc744a8ff94d537f74c228e8b4e17c2468c50ccd89fc21ecc3940a70
command: ["text-generation-launcher"]
args: ["--model-name=/mnt/models/artifacts/"]
env:
Expand All @@ -21,14 +21,12 @@ spec:
# cpu: 8
# memory: 16Gi
- name: transformer-container
image: quay.io/modh/caikit-tgis-serving@sha256:5350ac5f5883b7072296edf8583279ffe2b37c737d59f999c26f5f03bb7889bf
image: quay.io/modh/caikit-tgis-serving@sha256:fe0d1f1233d0b056ca7c690f765b20611e20837465674998e3d293df9b95e838
env:
- name: TRANSFORMERS_CACHE
value: /tmp/transformers_cache
- name: RUNTIME_LOCAL_MODELS_DIR
value: /mnt/models
- name: TRANSFORMERS_CACHE
value: /tmp/transformers_cache
- name: RUNTIME_GRPC_ENABLED
value: "false"
- name: RUNTIME_HTTP_ENABLED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
- --rest_bind_address=0.0.0.0
- --target_device=AUTO
- --metrics_enable
image: quay.io/modh/openvino_model_server@sha256:9086c1ba1ba30d358194c534f0563923aab02d03954e43e9f3647136b44a5daf
image: quay.io/modh/openvino_model_server@sha256:f1140e9d987580d1aab1ccc62519b48b1d2673308b2db496e9e505e3be788d9f
name: kserve-container
ports:
- containerPort: 8888
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
name: pytorch
containers:
- name: kserve-container
image: quay.io/modh/text-generation-inference@sha256:28a15bf3dce43753a78e7b1b89ac40ef54dd4e2f1c103667daee009725cc2562
image: quay.io/modh/text-generation-inference@sha256:bb36bb41cc744a8ff94d537f74c228e8b4e17c2468c50ccd89fc21ecc3940a70
command: ["text-generation-launcher"]
args:
- "--model-name=/mnt/models/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
- '--served-model-name={{.Name}}'
- '--distributed-executor-backend=mp'
- '--chat-template=/app/data/template/template_chatml.jinja'
image: quay.io/modh/vllm@sha256:167aa05982214c3941afbdde7c5aff6f81040193a0db1dc06a5ad16af0a8780e
image: quay.io/modh/vllm@sha256:c86ff1e89c86bc9821b75d7f2bbc170b3c13e3ccf538bf543b1110f23e056316
name: kserve-container
command:
- python3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
containers:
- name: kserve-container
#image: kserve/vllmserver:latest
image: quay.io/modh/vllm@sha256:a2593489ee20b8e5f01358a9aa984fc90618c6335f4c8e138e94ce635ffb112a
image: quay.io/modh/vllm@sha256:c86ff1e89c86bc9821b75d7f2bbc170b3c13e3ccf538bf543b1110f23e056316
startupProbe:
httpGet:
port: 8080
Expand Down
1 change: 1 addition & 0 deletions ods_ci/tests/Resources/Page/OCPDashboard/Pods/Pods.robot

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ ${SERVING_MODEL_SERVERS_SIDE_MENU}= xpath=//span[text()='Models and model ser
${TOKEN_AUTH_CHECKBOX_XP}= xpath://input[@id="alt-form-checkbox-auth"]
${ADD_SERVICE_ACCOUNT_BUTTON}= xpath://button[text()='Add a service account']
${SERVICE_ACCOUNT_INPUT}= xpath://input[@data-testid='service-account-form-name']
${REPLICAS_COUNT_XP}= xpath=//input[@id='model-server-replicas']
${REPLICAS_COUNT_XP}= xpath=//input[@aria-label='model server replicas number input']
${PROJECT_SELECTOR_XP}= xpath://main[contains(@id, 'dashboard-page-main')]//*[@data-testid="project-selector-toggle"]
${DEPLOY_MULTI_MODEL_BTN}= //button[contains(@data-testid,"add-server-button")]


*** Keywords ***
Expand All @@ -39,8 +40,11 @@ Create Model Server
${existing_server}= Run Keyword And Return Status Wait Until Page Contains Element //button[.="${server_name}"]
IF ${existing_server} Run Keyword And Return
... Log Model Server '${server_name}' already exists, reusing server console=True
ELSE
SeleniumLibrary.Click Button //button[@data-testid="multi-serving-select-button"]
END
SeleniumLibrary.Click Button Add model server
SeleniumLibrary.Wait Until Page Contains Element ${DEPLOY_MULTI_MODEL_BTN}
SeleniumLibrary.Click Button ${DEPLOY_MULTI_MODEL_BTN}
SeleniumLibrary.Wait Until Page Contains Element //span[.="Add model server"]
Set Model Server Name ${server_name}
Set Replicas Number With Buttons ${no_replicas}
Expand Down Expand Up @@ -221,7 +225,7 @@ Get Model Serving Access Token via UI
SeleniumLibrary.Wait Until Page Contains Element xpath://td[@data-label="Tokens"]/button
SeleniumLibrary.Click Element xpath://td[@data-label="Tokens"]/button
${token}= SeleniumLibrary.Get Element Attribute
... xpath://div[.="${service_account_name} "]/../../td[@data-label="Token Secret"]//span/input value
... xpath://div[.="${service_account_name}"]/../../td[@data-label="Token Secret"]//span/input value
END
RETURN ${token}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Verify Model Status
Delete Model Via UI
[Documentation] Deletes a deployed model from the Model Serving page in the dashboard.
[Arguments] ${model_name}
${model_row_xpath}= Set Variable xpath://tr[starts-with(., '${model_name} ')]
${model_row_xpath}= Set Variable xpath://tr[starts-with(., '${model_name}')]
Wait Until Element Is Visible ${model_row_xpath}
ODHDashboard.Click Action From Actions Menu item_title=${model_name} action=Delete
Wait Until Page Contains Element xpath://input[@id="delete-modal-input"]
Expand All @@ -226,7 +226,7 @@ Get Model Route Via UI
[Arguments] ${model_name}
# TODO: Open model serving home page if needed?
# Click on Inference Endpoints link
${endpoint_link}= Set Variable //a[@data-testid="metrics-link-test-model" and text()="${model_name}"]/ancestor::tr//td//button[@data-testid="internal-external-service-button"]
${endpoint_link}= Set Variable //a[contains(@data-testid, 'metrics-link')][text() = '${model_name}']/ancestor::tr//td//button[@data-testid="internal-external-service-button"]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (184/120)
SeleniumLibrary.Wait Until Page Contains Element ${endpoint_link}
SeleniumLibrary.Click Button ${endpoint_link}
# Get the external URL
Expand Down Expand Up @@ -414,8 +414,9 @@ Clean Up Model Serving Page
[Documentation] Deletes all currently deployed models, if any are present.
# Returns an empty list if no matching elements found
Switch Model Serving Project project_name=All projects
${projects}= Get WebElements xpath://table/tbody/tr/td[@data-label="Project"]
FOR ${project} IN @{projects}
@{projects}= Get WebElements xpath://table/tbody/tr/td[@data-label="Project"]
WHILE len(@{projects}) > 0
${project}= Set Variable ${projects}[0]
${project}= Get Text ${project}
@{project description}= Split String ${project}
Switch Model Serving Project ${project description}[0]
Expand All @@ -426,6 +427,7 @@ Clean Up Model Serving Page
Sleep 1s
END
Switch Model Serving Project project_name=All projects
@{projects}= Get WebElements xpath://table/tbody/tr/td[@data-label="Project"]

Check notice

Code scanning / Robocop

Variable '{{ name }}' is assigned but not used Note test

Variable '@{projects}' is assigned but not used
END

Add Namespace To ServiceMeshMemberRoll
Expand Down Expand Up @@ -515,10 +517,27 @@ Deploy Kserve Model Via UI #robocop: disable
Set Model Server Runtime
[Documentation] Opens the Serving runtime dropdown in the deploy model modal window for models
... and select the given runtime
[Arguments] ${runtime}=Caikit TGIS
Page Should Contain Element ${KSERVE_RUNTIME_DROPDOWN}
Click Element ${KSERVE_RUNTIME_DROPDOWN}
Click Element //span[contains(text(),"${runtime}")]
[Arguments] ${runtime}=Caikit TGIS ${retries}=1
TRY
${is_enabled}= Run Keyword And Return Status
... Element Should Be Enabled xpath://button[@id="serving-runtime-template-selection"]

IF ${is_enabled}
FOR ${retry_idx} IN RANGE 0 1+${retries}
Click Element xpath://button[@id="serving-runtime-template-selection"]
Page Should Contain Element xpath://span[contains(., "${runtime}")]
${selected}= Run Keyword And Return Status
... Click Element xpath://span[contains(., "${runtime}")]
IF ${selected}==${TRUE} BREAK

Check notice

Code scanning / Robocop

'{{ block_name }}' condition can be simplified Note test

'INLINE IF' condition can be simplified
END
ELSE
Element Should Be Disabled id:serving-runtime-template-selection
${text}= Get Text xpath://button[@id="serving-runtime-template-selection"]/span
Should Be True ${runtime} in ${text}
END
EXCEPT
Log framework ${runtime} does not appear to be supported by the chosen model server
END

Get Kserve Inference Host Via UI
[Documentation] Fetches the host of the model's URL from the Data Science Project UI
Expand Down
Loading

0 comments on commit 8cfdd75

Please sign in to comment.