diff --git a/conda/tempo-examples.yaml b/conda/tempo-examples.yaml index 4da7b189..c88edc55 100644 --- a/conda/tempo-examples.yaml +++ b/conda/tempo-examples.yaml @@ -14,7 +14,7 @@ dependencies: - alibi==0.5.7 - alibi-detect==0.6.0 - dill - - mlserver==0.3.2 + - mlserver==0.4.0 - xgboost - ansible - openshift diff --git a/docs/examples/asyncio/artifacts/classifier/conda.yaml b/docs/examples/asyncio/artifacts/classifier/conda.yaml index 7d087c21..69817b85 100644 --- a/docs/examples/asyncio/artifacts/classifier/conda.yaml +++ b/docs/examples/asyncio/artifacts/classifier/conda.yaml @@ -5,4 +5,4 @@ dependencies: - python=3.7.9 - pip: - mlops-tempo - - mlserver==0.3.2 + - mlserver==0.4.0 diff --git a/docs/examples/custom-model/artifacts/conda.yaml b/docs/examples/custom-model/artifacts/conda.yaml index e5918643..15bdc931 100644 --- a/docs/examples/custom-model/artifacts/conda.yaml +++ b/docs/examples/custom-model/artifacts/conda.yaml @@ -5,5 +5,5 @@ dependencies: - python=3.7.9 - pip: - mlops-tempo - - mlserver==0.3.2 + - mlserver==0.4.0 - numpyro==0.6.0 diff --git a/docs/examples/explainer/artifacts/explainer/conda.yaml b/docs/examples/explainer/artifacts/explainer/conda.yaml index ce1dbf05..875f212f 100644 --- a/docs/examples/explainer/artifacts/explainer/conda.yaml +++ b/docs/examples/explainer/artifacts/explainer/conda.yaml @@ -7,4 +7,4 @@ dependencies: - alibi==0.5.8 - dill - mlops-tempo - - mlserver==0.3.2 + - mlserver==0.4.0 diff --git a/docs/examples/kfserving/artifacts/classifier/conda.yaml b/docs/examples/kfserving/artifacts/classifier/conda.yaml index 9fc2310e..7dd962e5 100644 --- a/docs/examples/kfserving/artifacts/classifier/conda.yaml +++ b/docs/examples/kfserving/artifacts/classifier/conda.yaml @@ -5,4 +5,4 @@ dependencies: - python=3.7.9 - pip: - mlops-tempo - - mlserver==0.3.2 + - mlserver==0.4.0 diff --git a/docs/examples/logging-insights/artifacts/conda.yaml b/docs/examples/logging-insights/artifacts/conda.yaml index 5e18f36a..89301d60 100644 --- a/docs/examples/logging-insights/artifacts/conda.yaml +++ b/docs/examples/logging-insights/artifacts/conda.yaml @@ -6,4 +6,4 @@ dependencies: - python=3.7.9 - pip: - mlops-tempo @ file:///home/clive/work/mlops/fork-tempo - - mlserver==0.3.2 + - mlserver==0.4.0 diff --git a/docs/examples/logging-insights/conda.yaml b/docs/examples/logging-insights/conda.yaml index c45fc00e..bf715059 100644 --- a/docs/examples/logging-insights/conda.yaml +++ b/docs/examples/logging-insights/conda.yaml @@ -6,4 +6,4 @@ dependencies: - python=3.7.9 - pip: - mlops-tempo @ file:///home/alejandro/Programming/kubernetes/seldon/tempo - - mlserver==0.3.1.dev7 + - mlserver==0.4.0 diff --git a/docs/examples/multi-model/artifacts/classifier/conda.yaml b/docs/examples/multi-model/artifacts/classifier/conda.yaml index 9fc2310e..7dd962e5 100644 --- a/docs/examples/multi-model/artifacts/classifier/conda.yaml +++ b/docs/examples/multi-model/artifacts/classifier/conda.yaml @@ -5,4 +5,4 @@ dependencies: - python=3.7.9 - pip: - mlops-tempo - - mlserver==0.3.2 + - mlserver==0.4.0 diff --git a/docs/examples/outlier/artifacts/outlier/conda.yaml b/docs/examples/outlier/artifacts/outlier/conda.yaml index c649ccc6..031ec8b6 100644 --- a/docs/examples/outlier/artifacts/outlier/conda.yaml +++ b/docs/examples/outlier/artifacts/outlier/conda.yaml @@ -8,4 +8,4 @@ dependencies: - dill==0.3.2 - opencv-python-headless - mlops-tempo - - mlserver==0.3.2 + - mlserver==0.4.0 diff --git a/docs/examples/outlier/artifacts/svc/conda.yaml b/docs/examples/outlier/artifacts/svc/conda.yaml index 9fc2310e..7dd962e5 100644 --- a/docs/examples/outlier/artifacts/svc/conda.yaml +++ b/docs/examples/outlier/artifacts/svc/conda.yaml @@ -5,4 +5,4 @@ dependencies: - python=3.7.9 - pip: - mlops-tempo - - mlserver==0.3.2 + - mlserver==0.4.0 diff --git a/tempo/seldon/constants.py b/tempo/seldon/constants.py index 5fabb12f..3e9877fa 100644 --- a/tempo/seldon/constants.py +++ b/tempo/seldon/constants.py @@ -1,2 +1,2 @@ -MLSERVER_IMAGE = "seldonio/mlserver:0.3.2" +MLSERVER_IMAGE = "seldonio/mlserver:0.4.0" TRITON_IMAGE = "nvcr.io/nvidia/tritonserver:20.08-py3" diff --git a/tempo/serve/constants.py b/tempo/serve/constants.py index d2493fa7..8c55ab0e 100644 --- a/tempo/serve/constants.py +++ b/tempo/serve/constants.py @@ -8,7 +8,7 @@ DefaultRemoteFilename = "remote.pickle" DefaultEnvFilename = "environment.tar.gz" -MLServerEnvDeps = ["mlserver==0.3.2"] +MLServerEnvDeps = ["mlserver==0.4.0"] DefaultCondaFile = "conda.yaml" ENV_K8S_SERVICE_HOST = "KUBERNETES_SERVICE_HOST" diff --git a/tests/test_mlserver.py b/tests/test_mlserver.py index 624134ba..7c70ee0a 100644 --- a/tests/test_mlserver.py +++ b/tests/test_mlserver.py @@ -2,9 +2,9 @@ from inspect import iscoroutine import pytest +from mlserver.codecs import NumpyCodec from mlserver.settings import ModelSettings from mlserver.types import InferenceRequest, RequestInput -from mlserver.utils import to_ndarray from pytest_cases import fixture, parametrize_with_cases from pytest_cases.common_pytest_lazy_values import is_lazy @@ -48,7 +48,8 @@ async def test_predict(mlserver_runtime: InferenceRuntime, inference_request: In assert len(res.outputs) == 1 - pipeline_input = to_ndarray(inference_request.inputs[0]) + codec = NumpyCodec() + pipeline_input = codec.decode(inference_request.inputs[0]) custom_model = copy.copy(mlserver_runtime._model) # Ensure direct call to class does not try to do remote custom_model.set_remote(False) @@ -58,11 +59,12 @@ async def test_predict(mlserver_runtime: InferenceRuntime, inference_request: In pipeline_output = res.outputs[0].data - assert expected_output.tolist() == pipeline_output + assert expected_output.tolist() == pipeline_output.__root__ async def test_load_wrapped_class(inference_pipeline_class, inference_request: InferenceRequest): - pipeline_input = to_ndarray(inference_request.inputs[0]) + codec = NumpyCodec() + pipeline_input = codec.decode(inference_request.inputs[0]) inference_pipeline_class(pipeline_input) assert inference_pipeline_class.counter == 1