-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add TGIS test for fetching model from Minio object storage #1231
Changes from 3 commits
924ece6
a8a4532
1dcfe80
beb7fd2
ecae5fa
a0fd8bf
37c30bd
5c141ee
ff21b58
1288d3b
285f66f
34eb16b
d8d3603
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
*** Settings *** | ||
Documentation Collcetion of keywords to deploy and remove MinIO storage | ||
Library OperatingSystem | ||
Resource ../Common.robot | ||
|
||
Check warning Code scanning / Robocop Invalid number of empty lines between sections ({{ empty_lines }}/{{ allowed_empty_lines }}) Warning test
Invalid number of empty lines between sections (1/2)
|
||
*** Variables *** | ||
${MINIO_RESOURCES_DIRPATH}= ods_ci/tests/Resources/Files/minio | ||
${MINIO_POD_FILEPATH}= ${MINIO_RESOURCES_DIRPATH}/minio.yaml | ||
${MINIO_SECRET_FILEPATH}= ${MINIO_RESOURCES_DIRPATH}/minio_secret.yaml | ||
${MINIO_SA_FILEPATH}= ${MINIO_RESOURCES_DIRPATH}/minio_serviceaccount.yaml | ||
|
||
|
||
*** Keywords *** | ||
Deploy MinIO | ||
Check warning Code scanning / Robocop Missing documentation in '{{ name }}' keyword Warning test
Missing documentation in 'Deploy MinIO' keyword
|
||
[Arguments] ${minio_image}=quay.io/modh/ods-ci-minio-models:1.0 | ||
... ${namespace}=minio | ||
# ${key} ${pw}= Generate Minio Random Credentials | ||
${key}= Set Variable user | ||
${pw}= Set Variable myfakepassword | ||
Set Test Variable ${key} | ||
Check notice Code scanning / Robocop {{ set_variable_keyword }} can be replaced with VAR Note test
Set Test Variable can be replaced with VAR
Check warning Code scanning / Robocop Test, suite and global variables should be uppercase Warning test
Test, suite and global variables should be uppercase
|
||
Set Test Variable ${pw} | ||
Check notice Code scanning / Robocop {{ set_variable_keyword }} can be replaced with VAR Note test
Set Test Variable can be replaced with VAR
Check warning Code scanning / Robocop Test, suite and global variables should be uppercase Warning test
Test, suite and global variables should be uppercase
|
||
Set Test Variable ${url} ${minio_image} | ||
Check notice Code scanning / Robocop {{ set_variable_keyword }} can be replaced with VAR Note test
Set Test Variable can be replaced with VAR
Check warning Code scanning / Robocop Test, suite and global variables should be uppercase Warning test
Test, suite and global variables should be uppercase
|
||
Create File From Template ${MINIO_POD_FILEPATH} ${MINIO_RESOURCES_DIRPATH}/minio_filled.yaml | ||
# Create File From Template ${MINIO_SECRET_FILEPATH} ${MINIO_RESOURCES_DIRPATH}/minio_secret_filled.yaml | ||
${rc}= Run And Return Rc oc new-project ${namespace} | ||
Check warning Code scanning / Robocop Local variable '{{ name }}' is overwritten before usage Warning test
Local variable '${rc}' is overwritten before usage
|
||
${rc} ${out}= Run And Return Rc And Output oc apply -f ${MINIO_RESOURCES_DIRPATH}/minio_filled.yaml -n ${namespace} | ||
Check warning Code scanning / Robocop Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
Line is too long (128/120)
Check notice Code scanning / Robocop Variable '{{ name }}' is assigned but not used Note test
Variable '${rc}' is assigned but not used
Check notice Code scanning / Robocop Variable '{{ name }}' is assigned but not used Note test
Variable '${out}' is assigned but not used
|
||
# Oc Apply kind=Pod src=${MINIO_RESOURCES_DIRPATH}/minio_filled.yaml namespace=${namespace} | ||
# Oc Apply kind=Secret src=${MINIO_RESOURCES_DIRPATH}/minio_secret_filled.yaml namespace=${namespace} | ||
# Oc Apply kind=ServiceAccount src=${MINIO_SA_FILEPATH} namespace=${namespace} | ||
${route}= Run And Return Rc And Output oc get route minio-route -n ${namespace} --template={{.spec.host}} | ||
RETURN ${route} | ||
|
||
Generate Minio Random Credentials | ||
Check warning Code scanning / Robocop Missing documentation in '{{ name }}' keyword Warning test
Missing documentation in 'Generate Minio Random Credentials' keyword
|
||
${key}= Generate Random String chars=[NUMBERS][LETTERS] | ||
${pw}= Generate Random String chars=[NUMBERS][LETTERS] | ||
RETURN ${key} ${pw} | ||
|
||
Get Minio Credentials | ||
Check warning Code scanning / Robocop Missing documentation in '{{ name }}' keyword Warning test
Missing documentation in 'Get Minio Credentials' keyword
|
||
[Arguments] ${namespace} ${podname}=ods-ci-minio | ||
Check warning Code scanning / Robocop Keyword argument '{{ name }}' is not used Warning test
Keyword argument '${namespace}' is not used
Check warning Code scanning / Robocop Keyword argument '{{ name }}' is not used Warning test
Keyword argument '${podname}' is not used
|
||
${key}= Set Variable user | ||
${pw}= Set Variable myfakepassword | ||
RETURN ${key} ${pw} | ||
Check warning Code scanning / Robocop Missing trailing blank line at the end of file Warning test
Missing trailing blank line at the end of file
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: minio-service | ||
spec: | ||
ports: | ||
- name: minio-client-port | ||
port: 9000 | ||
protocol: TCP | ||
targetPort: 9000 | ||
selector: | ||
app: minio | ||
--- | ||
kind: Route | ||
apiVersion: route.openshift.io/v1 | ||
metadata: | ||
name: minio-route | ||
spec: | ||
to: | ||
kind: Service | ||
name: minio-service | ||
weight: 100 | ||
port: | ||
targetPort: ui | ||
wildcardPolicy: None | ||
tls: | ||
termination: edge | ||
insecureEdgeTerminationPolicy: Redirect | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
labels: | ||
app: minio | ||
name: ods-ci-minio | ||
spec: | ||
Check warning Code scanning / SonarCloud Service account tokens should not be mounted in pods
<!--SONAR_ISSUE_KEY:AY3mg2JV5j8f5LVwTkuG-->Set automountServiceAccountToken to false for this specification of kind Pod. <p>See more on <a href="https://sonarcloud.io/project/issues?id=red-hat-data-services_ods-ci&issues=AY3mg2JV5j8f5LVwTkuG&open=AY3mg2JV5j8f5LVwTkuG&pullRequest=1231">SonarCloud</a></p>
|
||
containers: | ||
- args: | ||
Check warning Code scanning / SonarCloud CPU limits should be enforced
<!--SONAR_ISSUE_KEY:AY3mg2JV5j8f5LVwTkuE-->Specify a CPU limit for this container. <p>See more on <a href="https://sonarcloud.io/project/issues?id=red-hat-data-services_ods-ci&issues=AY3mg2JV5j8f5LVwTkuE&open=AY3mg2JV5j8f5LVwTkuE&pullRequest=1231">SonarCloud</a></p>
Check warning Code scanning / SonarCloud Memory limits should be enforced
<!--SONAR_ISSUE_KEY:AY3mg2JV5j8f5LVwTkuF-->Specify a memory limit for this container. <p>See more on <a href="https://sonarcloud.io/project/issues?id=red-hat-data-services_ods-ci&issues=AY3mg2JV5j8f5LVwTkuF&open=AY3mg2JV5j8f5LVwTkuF&pullRequest=1231">SonarCloud</a></p>
|
||
- server | ||
- /data1 | ||
env: | ||
- name: MINIO_ACCESS_KEY | ||
value: ${key} | ||
- name: MINIO_SECRET_KEY | ||
value: ${pw} | ||
image: ${url} | ||
imagePullPolicy: Always | ||
name: minio |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
*** Settings *** | ||
Documentation Collection of CLI tests to validate the model serving stack for Large Language Models (LLM). | ||
... These tests leverage on TGIS Standalone Serving Runtime | ||
Resource ../../../../Resources/OCP.resource | ||
Resource ../../../../Resources/CLI/ModelServing/llm.resource | ||
Resource ../../../../Resources/CLI/Minio.resource | ||
Library OpenShiftLibrary | ||
Suite Setup Suite Setup | ||
Suite Teardown RHOSi Teardown | ||
Test Tags KServe | ||
|
||
|
||
*** Variables *** | ||
${MODEL_S3_DIR}= flan-t5-small-hf | ||
${TEST_NS}= tgis-storages | ||
${TGIS_RUNTIME_NAME}= tgis-runtime | ||
@{SEARCH_METRICS}= tgi_ istio_ | ||
Check notice Code scanning / Robocop Variable '{{ name }}' is assigned but not used Note test
Variable '@{SEARCH_METRICS}' is assigned but not used
|
||
|
||
|
||
Check warning Code scanning / Robocop Trailing whitespace at the end of line Warning test
Trailing whitespace at the end of line
|
||
*** Test Cases *** | ||
Verify User Can Serve And Query A Model From Minio | ||
Check warning Code scanning / Robocop Test case '{{ test_name }}' is too long ({{ test_length }}/{{ allowed_length }}) Warning test
Test case 'Verify User Can Serve And Query A Model From Minio' is too long (32/20)
Check warning Code scanning / Robocop Test case '{{ test_name }}' has too many keywords inside ({{ keyword_count }}/{{ max_allowed_count }}) Warning test
Test case 'Verify User Can Serve And Query A Model From Minio' has too many keywords inside (13/10)
|
||
[Documentation] Basic tests for preparing, deploying and querying a LLM model | ||
... using Kserve and Caikit+TGIS runtime | ||
[Tags] Tier1 RHOAIENG-3490 | ||
lugi0 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
${minio_namespace}= Set Variable minio-models | ||
Deploy MinIO namespace=${minio_namespace} | ||
Wait For Pods To Be Ready label_selector=app=minio | ||
... namespace=${minio_namespace} | ||
${key} ${pw}= Get Minio Credentials namespace=${minio_namespace} | ||
Set Project And Runtime runtime=${TGIS_RUNTIME_NAME} namespace=${TEST_NS}-minio | ||
... access_key_id=${key} access_key=${pw} | ||
... endpoint=minio-service.${minio_namespace}.svc.cluster.local:9000 | ||
... verify_ssl=${FALSE} # temporary | ||
${test_namespace}= Set Variable ${TEST_NS}-minio | ||
${model_name}= Set Variable flan-t5-small-hf | ||
${models_names}= Create List ${model_name} | ||
Check notice Code scanning / Robocop Variable '{{ name }}' is assigned but not used Note test
Variable '${models_names}' is assigned but not used
Check notice Code scanning / Robocop {{ create_keyword }} can be replaced with VAR Note test
Create List can be replaced with VAR
|
||
${storage_uri}= Set Variable s3://models/${MODEL_S3_DIR}/ | ||
Compile Inference Service YAML isvc_name=${model_name} | ||
... sa_name=${DEFAULT_BUCKET_SA_NAME} | ||
... model_storage_uri=${storage_uri} | ||
... model_format=pytorch serving_runtime=${TGIS_RUNTIME_NAME} | ||
Deploy Model Via CLI isvc_filepath=${INFERENCESERVICE_FILLED_FILEPATH} | ||
... namespace=${test_namespace} | ||
Wait For Pods To Be Ready label_selector=serving.kserve.io/inferenceservice=${model_name} | ||
... namespace=${test_namespace} | ||
Query Model Multiple Times model_name=${model_name} runtime=${TGIS_RUNTIME_NAME} | ||
... inference_type=all-tokens n_times=1 | ||
... namespace=${test_namespace} | ||
# Query Model Multiple Times model_name=${model_name} runtime=${TGIS_RUNTIME_NAME} | ||
# ... inference_type=streaming n_times=1 | ||
# ... namespace=${test_namespace} validate_response=${FALSE} | ||
# [Teardown] Clean Up Test Project test_ns=${test_namespace} | ||
# ... isvc_names=${models_names} wait_prj_deletion=${FALSE} | ||
|
||
|
||
*** Keywords *** | ||
Suite Setup | ||
[Documentation] | ||
Check warning Code scanning / Robocop Documentation of {{ block_name }} is empty Warning test
Documentation of 'Suite Setup' Keyword is empty
|
||
Skip If Component Is Not Enabled kserve | ||
# RHOSi Setup | ||
Load Expected Responses | ||
Run git clone https://github.com/IBM/text-generation-inference/ | ||
Check warning Code scanning / Robocop Missing trailing blank line at the end of file Warning test
Missing trailing blank line at the end of file
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use digest for the compatibility for disconnected cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bdattoma why do you deploy the Minio? In a disconencted env it is already available.
It is enough just to check test-variables.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will discuss offline