-
Notifications
You must be signed in to change notification settings - Fork 82
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
Migration of Onnx model kserve Grpc testcase UI -> API #2178
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"modelName":"densenetonnx","modelVersion":"1","id":"test1","outputs":[{"name":"fc6_1","datatype":"FP32","shape":["1000"]}],"rawOutputContents":["crbswY2eFMHy2ljBr3gZwk41nsGFaUfAwRMFwmtDScGn5h7BrHeHwdxaF8GCdt7A4DwkwezErcF98U/BQW4Iwbxw88BHxz7BmN4fwVPN7sGNiG7B5blvwUd0P8F3MqTB4RxUwbKIucHzFATCn6r7wTvnpcH5wczBxbHcwZmxvsE2KabByCZewaYnrkAMlIzBQuTfv1Mozz84gQ9B+IBkwanLXMGIUhXBIDmSwG6UfcHxIofBeiZKwTf1KEDOJ0PBAunpwdgtwMF3dCLB7/CNQDjkUEEnZu5AYr9PQCD7DUATXPlByjflwEOTasGPwhs95/zYQfriPcEGbXTBrvKpQHfmI8F/0ofBT3UfQZVHAEBHosw+kavuwUTvScGkB8a/m3UEwWWaT0B+3q3ApvsUQfTd6b/5zw5A6lbTwN7mC0Eq3wvCr6kJwovtc8DlbVjBtE8RwjkXA8JVDobBiAFfwUy7h8HLr9vBOZ5/waKBC8KYJojAJNBDwSJe6D/kgLrBVIeNwDm/z8BMv2HByQWnwFvF3sArnAnCQ0/QwSzPAcKd45PBIta0wYjICsLMab/BMNVWwb8KC8AVgiTCbRhSwSSN60BG/ePAse6rwXwZvMGfAgbCeYuTvvCQLcDvJonAP6qNwUsRFj9HFY1ARftxwaXOAsE46/rB8EmFwaBmz8FmkaPB/XuXwd+XTcEIDQb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QG0+kEEjWqhBtsuvwD+qCEFhaRZA7nn6voqpwEHRZBZBt89Dv1JEOMFfYavB1u4tQO5TlD8xF1vA7k2ZvpIQG8FB629B6KemQVoelUFl67VBfZqKQU6UV0EAhBHBNCwEQin06UBfib1AsfsGQbsUb8BKyAlBSaN0QW63zcDjTAhBvaAGwZD+RkAOGxvBKlIIQo1aLEJMy39CqhEAQoOoxsCtt+NADdXiPymzDMGoeoDBnjwJwYaWQcF4GShB+8sdvzs1JcGnHjHByDiAwBwcl0EWbVvAegd1wO9soEG9BwrCBmWiQd2Bib+8jYjBw2Jhv5Adu8G4BIHBv0z5wWZ3BcKElV/BMe6wQAPnvcGmp5JAqHhTwQ=="]} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ | |
${INFERENCE_REST_INPUT_PYTHON}= @tests/Resources/Files/triton/kserve-triton-python-rest-input.json | ||
${EXPECTED_INFERENCE_REST_OUTPUT_FILE_ONNX}= tests/Resources/Files/triton/kserve-triton-onnx-rest-output.json | ||
${INFERENCE_REST_INPUT_ONNX}= @tests/Resources/Files/triton/kserve-triton-onnx-rest-input.json | ||
${INFERENCE_GRPC_INPUT_ONNXFILE}= tests/Resources/Files/triton/kserve-triton-onnx-grpc-input.json | ||
${EXPECTED_INFERENCE_GRPC_OUTPUT_FILE_ONNX}= tests/Resources/Files/triton/kserve-triton-onnx-grpc-output.json | ||
${KSERVE_MODE}= Serverless # Serverless | ||
${PROTOCOL}= http | ||
${TEST_NS}= tritonmodel | ||
|
@@ -125,7 +127,7 @@ | |
... isvc_names=${models_names} wait_prj_deletion=${FALSE} kserve_mode=${KSERVE_MODE} | ||
... AND | ||
... Run Keyword If "${KSERVE_MODE}"=="RawDeployment" Terminate Process triton-process kill=true | ||
|
||
Test Python Model Grpc Inference Via API (Triton on Kserve) # robocop: off=too-long-test-case | ||
[Documentation] Test the deployment of python model in Kserve using Triton | ||
[Tags] Tier2 RHOAIENG-16912 | ||
|
@@ -166,15 +168,15 @@ | |
... 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 triton-process kill=true | ||
|
||
Test Onnx Model Rest Inference Via API (Triton on Kserve) # robocop: off=too-long-test-case | ||
[Documentation] Test the deployment of onnx model in Kserve using Triton | ||
[Tags] Tier2 RHOAIENG-16908 | ||
Setup Test Variables model_name=${ONNX_MODEL_NAME} use_pvc=${FALSE} use_gpu=${FALSE} | ||
... kserve_mode=${KSERVE_MODE} model_path=triton/model_repository/ | ||
Log ${ONNX_MODEL_NAME} | ||
Set Project And Runtime runtime=${KSERVE_RUNTIME_REST_NAME} protocol=${PROTOCOL} namespace=${test_namespace} | ||
... download_in_pvc=${DOWNLOAD_IN_PVC} model_name=${ONNX_MODEL_NAME} | ||
... storage_size=100Mi memory_request=100Mi | ||
${requests}= Create Dictionary memory=1Gi | ||
|
@@ -189,7 +191,7 @@ | |
# File is not needed anymore after applying | ||
Remove File ${INFERENCESERVICE_FILLED_FILEPATH} | ||
Wait For Pods To Be Ready label_selector=serving.kserve.io/inferenceservice=${ONNX_MODEL_NAME} | ||
... namespace=${test_namespace} | ||
${pod_name}= Get Pod Name namespace=${test_namespace} | ||
... label_selector=serving.kserve.io/inferenceservice=${ONNX_MODEL_NAME} | ||
${service_port}= Extract Service Port service_name=${ONNX_MODEL_NAME}-predictor protocol=TCP | ||
|
@@ -210,6 +212,49 @@ | |
... AND | ||
... Run Keyword If "${KSERVE_MODE}"=="RawDeployment" Terminate Process triton-process kill=true | ||
|
||
Test Onnx Model Grpc Inference Via API (Triton on Kserve) # robocop: off=too-long-test-case | ||
[Documentation] Test the deployment of onnx model in Kserve using Triton | ||
[Tags] Tier2 RHOAIENG-16908 | ||
Setup Test Variables model_name=${ONNX_MODEL_NAME} use_pvc=${FALSE} use_gpu=${FALSE} | ||
... kserve_mode=${KSERVE_MODE} model_path=triton/model_repository/ | ||
Set Project And Runtime runtime=${KSERVE_RUNTIME_REST_NAME} protocol=${PROTOCOL_GRPC} namespace=${test_namespace} | ||
Check warning Code scanning / Robocop Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
Line is too long (128/120)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe this variable should be sth like "ONNX_REST_RUNTIME_NAME" rather than "KSERVE_RUNTIME_REST_NAME" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are using a single template that supports all REST models, so this applies to all the remaining models as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, then maybe "TRITON_REST_RU...." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bdattoma Makes sense! I will update it in the upcoming PRs. |
||
... download_in_pvc=${DOWNLOAD_IN_PVC} model_name=${ONNX_MODEL_NAME} | ||
... storage_size=100Mi memory_request=100Mi | ||
${requests}= Create Dictionary memory=1Gi | ||
Check notice Code scanning / Robocop {{ create_keyword }} can be replaced with VAR Note test
Create Dictionary can be replaced with VAR
|
||
Compile Inference Service YAML isvc_name=${ONNX_MODEL_NAME} | ||
... sa_name=models-bucket-sa | ||
... model_storage_uri=${storage_uri} | ||
... model_format=onnx serving_runtime=${KSERVE_RUNTIME_REST_NAME} | ||
... version="1" | ||
... limits_dict=${limits} requests_dict=${requests} kserve_mode=${KSERVE_MODE} | ||
Deploy Model Via CLI isvc_filepath=${INFERENCESERVICE_FILLED_FILEPATH} | ||
... namespace=${test_namespace} | ||
# File is not needed anymore after applying | ||
Remove File ${INFERENCESERVICE_FILLED_FILEPATH} | ||
Wait For Pods To Be Ready label_selector=serving.kserve.io/inferenceservice=${ONNX_MODEL_NAME} | ||
... namespace=${test_namespace} | ||
${pod_name}= Get Pod Name namespace=${test_namespace} | ||
|
||
... label_selector=serving.kserve.io/inferenceservice=${ONNX_MODEL_NAME} | ||
${valued} ${host}= Run And Return Rc And Output oc get ksvc ${ONNX_MODEL_NAME}-predictor -o jsonpath='{.status.url}' | ||
Check warning Code scanning / Robocop Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
Line is too long (127/120)
|
||
Log ${valued} | ||
${host}= Evaluate re.search(r"${PATTERN}", r"${host}").group(1) re | ||
Log ${host} | ||
${EXPECTED_INFERENCE_GRPC_OUTPUT_ONNX}= Load Json File | ||
... file_path=${EXPECTED_INFERENCE_GRPC_OUTPUT_FILE_ONNX} as_string=${TRUE} | ||
${inference_output}= Query Model With GRPCURL host=${host} port=443 | ||
... endpoint=inference.GRPCInferenceService/ModelInfer | ||
... json_body=@ input_filepath=${INFERENCE_GRPC_INPUT_ONNXFILE} | ||
... insecure=${True} protobuf_file=${PROTOBUFF_FILE} json_header=${NONE} | ||
${inference_output}= Evaluate json.dumps(${inference_output}) | ||
Log ${inference_output} | ||
${result} ${list}= Inference Comparison ${EXPECTED_INFERENCE_GRPC_OUTPUT_ONNX} ${inference_output} | ||
Log ${result} | ||
Log ${list} | ||
[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 triton-process kill=true | ||
|
||
*** Keywords *** | ||
Suite Setup | ||
|
Check warning
Code scanning / Robocop
Test case '{{ test_name }}' has too many keywords inside ({{ keyword_count }}/{{ max_allowed_count }}) Warning test