From 58c64a255ed5f6cbc9bcb5784603a33c6e5f8689 Mon Sep 17 00:00:00 2001 From: tarukumar <93319437+tarukumar@users.noreply.github.com> Date: Thu, 7 Mar 2024 19:21:09 +0530 Subject: [PATCH] For purley Kserv raw deployment teardown will fail when OSSM operator and resources are not deployed (#1265) Add deployment mode in teardown Signed-off-by: Tarun Kumar --- ods_ci/tests/Resources/CLI/ModelServing/llm.resource | 7 +++++-- .../LLMs/422__model_serving_llm_models.robot | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ods_ci/tests/Resources/CLI/ModelServing/llm.resource b/ods_ci/tests/Resources/CLI/ModelServing/llm.resource index b56c979b0..b01246330 100644 --- a/ods_ci/tests/Resources/CLI/ModelServing/llm.resource +++ b/ods_ci/tests/Resources/CLI/ModelServing/llm.resource @@ -606,6 +606,7 @@ Clean Up Test Project [Documentation] Deletes the given InferenceServices, check the NS gets removed from ServiceMeshMemberRoll ... and deletes the DS Project [Arguments] ${test_ns} ${isvc_names} ${isvc_delete}=${TRUE} ${wait_prj_deletion}=${TRUE} + ... ${kserve_mode}=Serverless IF ${isvc_delete} == ${TRUE} FOR ${index} ${isvc_name} IN ENUMERATE @{isvc_names} Log Deleting ${isvc_name} @@ -614,8 +615,10 @@ Clean Up Test Project ELSE Log To Console InferenceService Delete option not provided by user END - Wait Until Keyword Succeeds 10 1s Namespace Should Be Removed From ServiceMeshMemberRoll - ... namespace=${test_ns} + IF "${kserve_mode}"=="Serverless" + Wait Until Keyword Succeeds 10 1s Namespace Should Be Removed From ServiceMeshMemberRoll + ... namespace=${test_ns} + END ${rc} ${out}= Run And Return Rc And Output oc delete project ${test_ns} Should Be Equal As Integers ${rc} ${0} IF ${wait_prj_deletion} diff --git a/ods_ci/tests/Tests/400__ods_dashboard/420__model_serving/LLMs/422__model_serving_llm_models.robot b/ods_ci/tests/Tests/400__ods_dashboard/420__model_serving/LLMs/422__model_serving_llm_models.robot index a749e9a19..6679df828 100644 --- a/ods_ci/tests/Tests/400__ods_dashboard/420__model_serving/LLMs/422__model_serving_llm_models.robot +++ b/ods_ci/tests/Tests/400__ods_dashboard/420__model_serving/LLMs/422__model_serving_llm_models.robot @@ -50,6 +50,7 @@ Verify User Can Serve And Query A bigscience/mt0-xxl Model [Teardown] Run Keywords ... Clean Up Test Project test_ns=${test_namespace} ... isvc_names=${models_names} wait_prj_deletion=${FALSE} + ... kserve_mode=${KSERVE_MODE} ... AND ... Run Keyword If "${KSERVE_MODE}"=="RawDeployment" Terminate Process llm-query-process kill=true @@ -85,6 +86,7 @@ Verify User Can Serve And Query A google/flan-t5-xl Model [Teardown] Run Keywords ... Clean Up Test Project test_ns=${test_namespace} ... isvc_names=${models_names} wait_prj_deletion=${FALSE} + ... kserve_mode=${KSERVE_MODE} ... AND ... Run Keyword If "${KSERVE_MODE}"=="RawDeployment" Terminate Process llm-query-process kill=true @@ -120,6 +122,7 @@ Verify User Can Serve And Query A google/flan-t5-xxl Model [Teardown] Run Keywords ... Clean Up Test Project test_ns=${test_namespace} ... isvc_names=${models_names} wait_prj_deletion=${FALSE} + ... kserve_mode=${KSERVE_MODE} ... AND ... Run Keyword If "${KSERVE_MODE}"=="RawDeployment" Terminate Process llm-query-process kill=true @@ -154,6 +157,7 @@ Verify User Can Serve And Query A elyza/elyza-japanese-llama-2-7b-instruct Model [Teardown] Run Keywords ... Clean Up Test Project test_ns=${test_namespace} ... isvc_names=${models_names} wait_prj_deletion=${FALSE} + ... kserve_mode=${KSERVE_MODE} ... AND ... Run Keyword If "${KSERVE_MODE}"=="RawDeployment" Terminate Process llm-query-process kill=true @@ -189,9 +193,10 @@ Verify User Can Serve And Query A ibm/mpt-7b-instruct2 Model [Teardown] Run Keywords ... Clean Up Test Project test_ns=${test_namespace} ... isvc_names=${models_names} wait_prj_deletion=${FALSE} + ... kserve_mode=${KSERVE_MODE} ... AND ... Run Keyword If "${KSERVE_MODE}"=="RawDeployment" Terminate Process llm-query-process kill=true - + Verify User Can Serve And Query A google/flan-ul-2 Model [Documentation] Basic tests for preparing, deploying and querying a LLM model ... using Kserve and TGIS runtime @@ -224,6 +229,7 @@ Verify User Can Serve And Query A google/flan-ul-2 Model [Teardown] Run Keywords ... Clean Up Test Project test_ns=${test_namespace} ... isvc_names=${models_names} wait_prj_deletion=${FALSE} + ... kserve_mode=${KSERVE_MODE} ... AND ... Run Keyword If "${KSERVE_MODE}"=="RawDeployment" Terminate Process llm-query-process kill=true