Skip to content

Commit 2ae17c0

Browse files
authored
Merge branch 'main' into demo_pytest
2 parents f3bd1d3 + 9fe8c0e commit 2ae17c0

File tree

37 files changed

+2330
-0
lines changed

37 files changed

+2330
-0
lines changed

conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ def pytest_addoption(parser: Parser) -> None:
111111
default=os.environ.get("TRITON_RUNTIME_IMAGE"),
112112
help="Specify the runtime image to use for the tests",
113113
)
114+
runtime_group.addoption(
115+
"--mlserver-runtime-image",
116+
default=os.environ.get("MLSERVER_RUNTIME_IMAGE"),
117+
help="Specify the runtime image to use for the tests",
118+
)
114119

115120
# Upgrade options
116121
upgrade_group.addoption(

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,12 @@ def triton_runtime_image(pytestconfig: pytest.Config) -> str | None:
228228
return None
229229
return runtime_image
230230

231+
def mlserver_runtime_image(pytestconfig: pytest.Config) -> str | None:
232+
runtime_image = pytestconfig.option.mlserver_runtime_image
233+
if not runtime_image:
234+
return None
235+
return runtime_image
236+
231237

232238
@pytest.fixture(scope="session")
233239
def use_unprivileged_client(pytestconfig: pytest.Config) -> bool:

tests/model_serving/model_runtime/mlserver/__init__.py

Whitespace-only changes.

tests/model_serving/model_runtime/mlserver/basic_model_deployment/__init__.py

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"modelName": "catboost",
3+
"modelVersion": "v0.1.0",
4+
"outputs": [
5+
{
6+
"contents": {
7+
"int64Contents": [
8+
"0"
9+
]
10+
},
11+
"datatype": "INT64",
12+
"name": "predict",
13+
"parameters": {
14+
"content_type": {
15+
"stringParam": "np"
16+
}
17+
},
18+
"shape": [
19+
"1",
20+
"1"
21+
]
22+
}
23+
]
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"id": "catboost",
3+
"model_name": "catboost",
4+
"model_version": "v0.1.0",
5+
"outputs": [
6+
{
7+
"data": [
8+
0
9+
],
10+
"datatype": "INT64",
11+
"name": "predict",
12+
"parameters": {
13+
"content_type": "np"
14+
},
15+
"shape": [
16+
1,
17+
1
18+
]
19+
}
20+
],
21+
"parameters": {}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"modelName": "catboost",
3+
"modelVersion": "v0.1.0",
4+
"outputs": [
5+
{
6+
"contents": {
7+
"int64Contents": [
8+
"0"
9+
]
10+
},
11+
"datatype": "INT64",
12+
"name": "predict",
13+
"parameters": {
14+
"content_type": {
15+
"stringParam": "np"
16+
}
17+
},
18+
"shape": [
19+
"1",
20+
"1"
21+
]
22+
}
23+
]
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"id": "catboost",
3+
"model_name": "catboost",
4+
"model_version": "v0.1.0",
5+
"outputs": [
6+
{
7+
"data": [
8+
0
9+
],
10+
"datatype": "INT64",
11+
"name": "predict",
12+
"parameters": {
13+
"content_type": "np"
14+
},
15+
"shape": [
16+
1,
17+
1
18+
]
19+
}
20+
],
21+
"parameters": {}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"modelName": "lightgbm-iris",
3+
"modelVersion": "v0.1.0",
4+
"outputs": [
5+
{
6+
"contents": {
7+
"fp64Contents": [
8+
1.5461848371087045e-05,
9+
0.00019280402569017216,
10+
0.9997917341259387
11+
]
12+
},
13+
"datatype": "FP64",
14+
"name": "predict",
15+
"parameters": {
16+
"content_type": {
17+
"stringParam": "np"
18+
}
19+
},
20+
"shape": [
21+
"1",
22+
"3"
23+
]
24+
}
25+
]
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"id": "lightgbm-iris",
3+
"model_name": "lightgbm-iris",
4+
"model_version": "v0.1.0",
5+
"outputs": [
6+
{
7+
"data": [
8+
1.5461848371087045e-05,
9+
0.00019280402569017216,
10+
0.9997917341259387
11+
],
12+
"datatype": "FP64",
13+
"name": "predict",
14+
"parameters": {
15+
"content_type": "np"
16+
},
17+
"shape": [
18+
1,
19+
3
20+
]
21+
}
22+
],
23+
"parameters": {}
24+
}

0 commit comments

Comments
 (0)