Skip to content

Commit 56d9f09

Browse files
committed
Add README for MLServer model car tests
1 parent d43cc72 commit 56d9f09

File tree

1 file changed

+46
-0
lines changed
  • tests/model_serving/model_runtime/mlserver/model_car

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# MLServer Model Car (OCI Image) Tests
2+
3+
End-to-end tests for MLServer inference using model car (OCI image-based) deployments.
4+
Models are packaged as OCI container images and deployed via KServe InferenceService with `storageUri: oci://...`.
5+
6+
## Supported Model Formats
7+
8+
- sklearn
9+
- xgboost
10+
- lightgbm
11+
- onnx
12+
13+
## OCI Model Images
14+
15+
The OCI model images used in these tests are built from:
16+
https://github.com/Jooho/oci-model-images
17+
18+
If the version of a supported framework (xgboost, lightgbm, sklearn, onnx) changes in MLServer,
19+
the model images must be rebuilt and pushed from that repository.
20+
21+
The framework versions used by MLServer can be found at:
22+
https://github.com/red-hat-data-services/MLServer/blob/main/requirements/requirements-cpu.txt#L261
23+
24+
For e2e testing, images should be tagged with the `-e2e` suffix to pin stable versions.
25+
26+
## Running Tests
27+
28+
Run all model car tests:
29+
30+
```bash
31+
OC_BINARY_PATH=/usr/local/bin/oc uv run pytest tests/model_serving/model_runtime/mlserver/model_car
32+
```
33+
34+
Run a specific model format (e.g., onnx only):
35+
36+
```bash
37+
OC_BINARY_PATH=/usr/local/bin/oc uv run pytest tests/model_serving/model_runtime/mlserver/model_car -k "onnx"
38+
```
39+
40+
## Updating Snapshots
41+
42+
If model responses change and snapshots need to be updated, add the `--snapshot-update` flag:
43+
44+
```bash
45+
OC_BINARY_PATH=/usr/local/bin/oc uv run pytest tests/model_serving/model_runtime/mlserver/model_car --snapshot-update
46+
```

0 commit comments

Comments
 (0)