From a0ba039a11b2d4ce5307104497c77bf91357bf76 Mon Sep 17 00:00:00 2001 From: "Tarun Chevula (CSI INTERFUSION INC)" Date: Tue, 12 Nov 2024 22:19:58 +0530 Subject: [PATCH] Added mlmonitoring to mlflow py39 --- .../mlflow-ubuntu20.04-py39-cpu-inference/context/Dockerfile | 2 -- .../context/conda_dependencies.yaml | 4 +++- .../context/mlflow_score_script.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/Dockerfile b/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/Dockerfile index febe5b12c9..9bc1edcbaf 100644 --- a/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/Dockerfile +++ b/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/Dockerfile @@ -13,8 +13,6 @@ ENV AML_APP_ROOT="/var/mlflow_resources" ENV AZUREML_ENTRY_SCRIPT="mlflow_score_script.py" USER root -# Copying of mlmonitoring will add once testing is completed. -# COPY mlmonitoring /var/mlflow_resources/mlmonitoring # We'll copy the HF scripts as well to enable better handling for v2 packaging. This will not require changes to the # packages installed in the image, as the expectation is that these will all be brought along with the model. diff --git a/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/conda_dependencies.yaml b/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/conda_dependencies.yaml index 9316499400..4652555dda 100644 --- a/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/conda_dependencies.yaml +++ b/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/conda_dependencies.yaml @@ -6,4 +6,6 @@ dependencies: - python=3.9.13 - pip - pip: - - azureml-inference-server-http=={{latest-pypi-version}} \ No newline at end of file + - azureml-inference-server-http=={{latest-pypi-version}} + - azureml-ai-monitoring=={{latest-pypi-version}} + \ No newline at end of file diff --git a/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/mlflow_score_script.py b/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/mlflow_score_script.py index 832d31f606..39ab1451ef 100644 --- a/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/mlflow_score_script.py +++ b/assets/inference/environments/mlflow-ubuntu20.04-py39-cpu-inference/context/mlflow_score_script.py @@ -17,7 +17,7 @@ from mlflow.models import Model from mlflow.pyfunc import load_model from mlflow.pyfunc.scoring_server import _get_jsonable_obj -from mlmonitoring import Collector +from azureml.ai.monitoring import Collector from mlflow.types.utils import _infer_schema from mlflow.types.schema import Schema, ColSpec, DataType from mlflow.exceptions import MlflowException