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

[UI] Runtime framework selection in model deployment - dropdown is available only if there's multiple selection #2051

Merged
merged 6 commits into from
Nov 21, 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
5 changes: 4 additions & 1 deletion ods_ci/tests/Resources/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
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: ${runtime_image}
image: quay.io/modh/vllm@sha256:167aa05982214c3941afbdde7c5aff6f81040193a0db1dc06a5ad16af0a8780e
name: kserve-container
command:
- python3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Resource ODHDataScienceProject/DataConnections.resource
Resource ../../../CLI/ModelServing/llm.resource
Library ../../../../../libs/Helpers.py
Library RPA.Desktop


*** Variables ***
Expand Down Expand Up @@ -124,41 +125,47 @@
${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

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
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}
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://span[contains(., "${framework}")]
IF ${selected}==${TRUE} BREAK
Dismissed Show dismissed Hide dismissed
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
Dismissed Show dismissed Hide dismissed


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}
Dismissed Show dismissed Hide dismissed
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}"
Dismissed Show dismissed Hide dismissed
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
Expand Down Expand Up @@ -511,7 +518,7 @@
[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
Expand Down
Loading