Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ environment: azureml://registries/azureml/environments/model-management/versions

code: ../../src/
command: |
# pip install transformers==4.48.0 torch==2.2.2 numpy==1.23.5 pandas==1.5.3 urllib3==1.26.19 --no-cache-dir --force-reinstall
# TODO: This has one disadvantage as shell logs wont be pushed to appinsights
set -ex
IFS=',' read -ra pip_pkgs <<< "$[[${{inputs.extra_pip_requirements}}]]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ outputs:

is_deterministic: True

environment: azureml://registries/azureml/environments/python-sdk-v2/versions/25
environment: azureml://registries/azureml/environments/python-sdk-v2/versions/29
code: ../../src
command: python run_model_validate.py --validation-info ${{outputs.validation_info}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ RUN pip install -r requirements.txt --no-cache-dir

# Vulnerability fix
RUN pip install Pillow gunicorn onnx==1.17.0 idna tqdm requests==2.32.1 tornado==6.4.2 certifi==2024.07.04 urllib3==1.26.19 scikit-learn==1.5.1 mlflow==2.20.3 mlflow-skinny==2.20.3 marshmallow==3.23.2
transformers==4.48.0 torch==2.2.2 numpy==1.23.5 pandas==1.5.3 azureml-evaluate-mlflow --no-cache-dir --force-reinstall

# List pip packages
RUN pip list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
MLflowSchemaLiterals as VirchowMLFlowSchemaLiterals, MLflowLiterals as VirchowMLflowLiterals
from azureml.model.mgmt.processors.pyfunc.hibou_b.config import \
MLflowSchemaLiterals as HibouBMLFlowSchemaLiterals, MLflowLiterals as HibouBMLflowLiterals

from azureml.model.mgmt.utils.common_utils import get_mlclient

logger = get_logger(__name__)

Expand Down Expand Up @@ -114,6 +114,12 @@ def _save(
:type metadata: Optional[Dict]. Defaults to {}.
"""
signatures = self._signatures or self.get_model_signature()
if not self._vllm_enabled:
mlclient = get_mlclient("azureml")
mlFlow_image = mlclient.environments.get("mlflow-model-inference", label="latest")
metadata["azureml.base_image"] = "mcr.microsoft.com/azureml/curated/mlflow-model-inference:" \
+ str(mlFlow_image.version)
logger.info("Metadata: {}".format(metadata))
# set metadata info
metadata.update(fetch_mlflow_acft_metadata(
base_model_name=self._model_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ def _save(
metadata["azureml.base_image"] = "mcr.microsoft.com/azureml/curated/foundation-model-inference:" \
+ str(vllm_image.version)
logger.info("Metadata: {}".format(metadata))
else:
mlclient = get_mlclient("azureml")
mlFlow_image = mlclient.environments.get("mlflow-model-inference", label="latest")
metadata["azureml.base_image"] = "mcr.microsoft.com/azureml/curated/mlflow-model-inference:" \
+ str(mlFlow_image.version)
logger.info("Metadata: {}".format(metadata))

if self._model_flavor == "OSS":
try:
Expand Down
Loading