From a6d0feba61a5403650312703b998d63f08c74279 Mon Sep 17 00:00:00 2001 From: rnetser Date: Tue, 19 Nov 2024 11:26:17 +0200 Subject: [PATCH 1/4] Runtime framework - dropdown only if multiple selection rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED --- .../ODH/ODHDashboard/ODHModelServing.resource | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource index dd8a8894c..91be08bcb 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource @@ -133,12 +133,26 @@ Select Framework ... Possible values for now: "onnx", "openvino_ir" [Arguments] ${framework} TRY - Open Model framework (name - version) Options Menu - Page Should Contain Element xpath://li/button[contains(., "${framework}")] - Click Element xpath://li/button[contains(., "${framework}")] + ${is_enabled}= Run Keyword And Return Status + ... Element Should Be Enabled xpath://button[@id="inference-service-framework-selection"] + + IF ${is_enabled} + FOR ${retry_idx} IN RANGE 0 1+${retries} + Open Model framework (name - version) Options Menu + Page Should Contain Element xpath://li/button[contains(., "${framework}")] + ${selected}= Run Keyword And Return Status + ... Click Element xpath://li/button[contains(., "${framework}")] #robocop: disable + IF ${selected}==${TRUE} BREAK + END + ELSE + Element Should Be Disabled id:inference-service-framework-selection + ${text}= Get Text xpath://button[@id="inference-service-framework-selection"]/span + Should Be True ${framework} in ${text} + END EXCEPT Log framework ${framework} does not appear to be supported by the chosen model server - END + END + Select Existing Data Connection [Documentation] Selects an existing data connection in the "deploy model" modal. From b185edc849382df3d38d92721bc6cb67ace5f373 Mon Sep 17 00:00:00 2001 From: rnetser Date: Tue, 19 Nov 2024 21:48:40 +0200 Subject: [PATCH 2/4] Fix data connection rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED --- .../vllm_servingruntime_http.yaml | 2 +- .../ODH/ODHDashboard/ODHModelServing.resource | 29 +++++++------------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/ods_ci/tests/Resources/Files/llm/serving_runtimes/vllm_servingruntime_http.yaml b/ods_ci/tests/Resources/Files/llm/serving_runtimes/vllm_servingruntime_http.yaml index 6ce3f691d..db54dfdcf 100644 --- a/ods_ci/tests/Resources/Files/llm/serving_runtimes/vllm_servingruntime_http.yaml +++ b/ods_ci/tests/Resources/Files/llm/serving_runtimes/vllm_servingruntime_http.yaml @@ -12,7 +12,7 @@ spec: - '--served-model-name={{.Name}}' - '--distributed-executor-backend=mp' - '--chat-template=/app/data/template/template_chatml.jinja' - image: ${runtime_image} + image: quay.io/modh/vllm@sha256:167aa05982214c3941afbdde7c5aff6f81040193a0db1dc06a5ad16af0a8780e name: kserve-container command: - python3 diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource index 91be08bcb..923c9ab57 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource @@ -7,6 +7,7 @@ Resource ODHDataScienceProject/ModelServer.resource Resource ODHDataScienceProject/DataConnections.resource Resource ../../../CLI/ModelServing/llm.resource Library ../../../../../libs/Helpers.py +Library RPA.Desktop *** Variables *** @@ -131,17 +132,17 @@ Select Model Server Select Framework [Documentation] Selects the framework in the "deploy model" modal. ... Possible values for now: "onnx", "openvino_ir" - [Arguments] ${framework} + [Arguments] ${framework} ${retries}=1 TRY ${is_enabled}= Run Keyword And Return Status ... Element Should Be Enabled xpath://button[@id="inference-service-framework-selection"] IF ${is_enabled} FOR ${retry_idx} IN RANGE 0 1+${retries} - Open Model framework (name - version) Options Menu - Page Should Contain Element xpath://li/button[contains(., "${framework}")] + Click Element xpath://button[@id="inference-service-framework-selection"] + Page Should Contain Element xpath://span[contains(., "${framework}")] ${selected}= Run Keyword And Return Status - ... Click Element xpath://li/button[contains(., "${framework}")] #robocop: disable + ... Click Element xpath://span[contains(., "${framework}")] IF ${selected}==${TRUE} BREAK END ELSE @@ -158,21 +159,13 @@ Select Existing Data Connection [Documentation] Selects an existing data connection in the "deploy model" modal. [Arguments] ${data_connection_name} ${retries}=1 - ${is_enabled}= Run Keyword And Return Status - ... Element Should Be Enabled xpath://button[@id="inference-service-data-connection"] - - IF ${is_enabled} - FOR ${retry_idx} IN RANGE 0 1+${retries} - Open Name Options Menu - Click Element xpath://li/button[.="${data_connection_name}"] - ${selected}= Run Keyword And Return Status - ... Page Should Contain Element //span[.="Name"]/../../..//button[@aria-label="Options menu"][.="${data_connection_name}"] #robocop: disable - IF ${selected}==${TRUE} BREAK + FOR ${retry_idx} IN RANGE 0 1+${retries} + Click Element xpath://button[@class="pf-v5-c-menu-toggle__button"] + Click Element xpath://button[@class="pf-v5-c-menu__item"]/span/span[contains(., "${data_connection_name}")] + ${selected}= Get Element Attribute //span[@class="pf-v5-c-text-input-group__text"]/input value + IF "${selected}"=="${data_connection_name}" + BREAK END - ELSE - Element Should Be Disabled id:inference-service-data-connection - ${text}= Get Text xpath://button[@id="inference-service-data-connection"]/span/div/div - Should Be Equal ${text} ${data_connection_name} END Set Folder Path From 34df5a7dbd1b98c90d2850611650e825a72ec49a Mon Sep 17 00:00:00 2001 From: rnetser Date: Wed, 20 Nov 2024 09:13:19 +0200 Subject: [PATCH 3/4] Fix data connection rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED --- .../Resources/Page/ODH/ODHDashboard/ODHModelServing.resource | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource index 923c9ab57..0c9d2dc9d 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource @@ -125,7 +125,7 @@ Select Model Server ${selectable}= Run Keyword And Return Status ... Wait Until Element Is Visible xpath://span[.="Model servers"]/../../..//button[@aria-label="Options menu"] timeout=3 IF ${selectable}==True - Open Model servers Options Menu # robocop:disable + Click Element xpath://button[@id="serving-runtime-template-selection"] Click Element xpath://li/button[.="${model_server}"] END From b5800035c8951751c55bc1ccea7a168545ee48f8 Mon Sep 17 00:00:00 2001 From: rnetser Date: Wed, 20 Nov 2024 14:20:07 +0200 Subject: [PATCH 4/4] fix things rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED --- ods_ci/tests/Resources/Common.robot | 5 ++++- .../Resources/Page/ODH/ODHDashboard/ODHModelServing.resource | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ods_ci/tests/Resources/Common.robot b/ods_ci/tests/Resources/Common.robot index 764d74aae..7e7265847 100644 --- a/ods_ci/tests/Resources/Common.robot +++ b/ods_ci/tests/Resources/Common.robot @@ -380,7 +380,10 @@ Wait Until Generic Modal Disappears ${is_modal}= Is Generic Modal Displayed IF ${is_modal} == ${TRUE} IF ${partial_match} == ${TRUE} - Wait Until Page Does Not Contain Element xpath=//*[contains(@id,"${id}")] timeout=${timeout} + ${is_displayed}= Run Keyword And Return Status xpath=//*[contains(@id,"${id}")] timeout=${timeout} + IF ${is_displayed} + Wait Until Page Does Not Contain Element xpath=//*[contains(@id,"${id}")] timeout=${timeout} + END ELSE Wait Until Page Does Not Contain Element xpath=//*[@id="${id}")] timeout=${timeout} END diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource index 0c9d2dc9d..b48743eed 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource @@ -518,7 +518,7 @@ Set Model Server Runtime [Arguments] ${runtime}=Caikit TGIS Page Should Contain Element ${KSERVE_RUNTIME_DROPDOWN} Click Element ${KSERVE_RUNTIME_DROPDOWN} - Click Element ${KSERVE_RUNTIME_DROPDOWN}/..//span[contains(text(),"${runtime}")] + Click Element //span[contains(text(),"${runtime}")] Get Kserve Inference Host Via UI [Documentation] Fetches the host of the model's URL from the Data Science Project UI