Add ONNX model format testcase in MLServer test-suite#1080
Add ONNX model format testcase in MLServer test-suite#1080dbasunag merged 1 commit intoopendatahub-io:mainfrom
Conversation
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/hold', '/build-push-pr-image', '/verified', '/cherry-pick', '/lgtm', '/wip'} |
f1cebcc to
cd10e3d
Compare
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe pull request adds ONNX model format support to the MLServer basic model deployment test suite by introducing a new ONNX snapshot JSON, adding an ONNX test parameter to the parameterized test, and defining ONNX-specific REST input constants and a MODEL_CONFIGS entry. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/model_serving/model_runtime/mlserver/constant.py (1)
80-90: Missing type annotation for consistency.Other REST input query constants (
SKLEARN_REST_INPUT_QUERY,XGBOOST_REST_INPUT_QUERY,LIGHTGBM_REST_INPUT_QUERY) have explicitdict[str, Any]type annotations. Add it here for consistency.Proposed fix
-ONNX_REST_INPUT_QUERY = { +ONNX_REST_INPUT_QUERY: dict[str, Any] = { "id": "onnx", "inputs": [ {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/model_serving/model_runtime/mlserver/constant.py` around lines 80 - 90, The constant ONNX_REST_INPUT_QUERY should have an explicit type annotation for consistency with other constants; update its declaration to include the type dict[str, Any] (i.e., annotate ONNX_REST_INPUT_QUERY: dict[str, Any]) while keeping the existing value unchanged so it matches SKLEARN_REST_INPUT_QUERY, XGBOOST_REST_INPUT_QUERY, and LIGHTGBM_REST_INPUT_QUERY.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tests/model_serving/model_runtime/mlserver/constant.py`:
- Around line 80-90: The constant ONNX_REST_INPUT_QUERY should have an explicit
type annotation for consistency with other constants; update its declaration to
include the type dict[str, Any] (i.e., annotate ONNX_REST_INPUT_QUERY: dict[str,
Any]) while keeping the existing value unchanged so it matches
SKLEARN_REST_INPUT_QUERY, XGBOOST_REST_INPUT_QUERY, and
LIGHTGBM_REST_INPUT_QUERY.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: e24203e0-9042-4152-94d6-099567738e49
📒 Files selected for processing (3)
tests/model_serving/model_runtime/mlserver/basic_model_deployment/__snapshots__/test_mlserver_basic_model_deployment/TestMLServerModels.test_mlserver_model_inference[onnx-raw-deployment].jsontests/model_serving/model_runtime/mlserver/basic_model_deployment/test_mlserver_basic_model_deployment.pytests/model_serving/model_runtime/mlserver/constant.py
Signed-off-by: Snomaan6846 <syedali@redhat.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
cd10e3d to
5024afb
Compare
|
Status of building tag latest: success. |
Signed-off-by: Snomaan6846 syedali@redhat.com
rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Description
Added ONNX model format testcase in MLServer test-suite.
Jira-Link : https://issues.redhat.com/browse/RHOAIENG-47134
How Has This Been Tested?
Merge criteria:
Summary by CodeRabbit