Skip to content

Commit 736afbe

Browse files
committed
fix: conda
1 parent c54636f commit 736afbe

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

articles/machine-learning/how-to-deploy-mlflow-models.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,32 @@ For no-code-deployment, Azure Machine Learning:
3939
> [!WARNING]
4040
> Online Endpoints dynamically installs Python packages provided MLflow model package during container runtime. deploying MLflow models to online endpoints with no-code deployment in a private network without egress connectivity is not supported by the moment. If that's your case, either enable egress connectivity or indicate the environment to use in the deployment as explained in [Customizing MLflow model deployments (Online Endpoints)](how-to-deploy-mlflow-models-online-endpoints.md#customizing-mlflow-model-deployments). This limitation is not present in Batch Endpoints.
4141
42+
### Implications of models with signatures
43+
44+
MLflow models can include a signature that indicates the expected inputs and their types. For those models containing a signature, Azure Machine Learning enforces compliance with it, both in terms of the number of inputs and their types. This means that your data input should comply with the types indicated in the model signature. If the data can't be parsed as expected, the invocation will fail. This applies for both online and batch endpoints.
45+
46+
__MLmodel__
47+
48+
:::code language="yaml" source="~/azureml-examples-main/sdk/python/endpoints/online/mlflow/sklearn-diabetes/model/MLmodel" highlight="13-19":::
49+
50+
You can inspect the model signature of your model by opening the MLmodel file associated with your MLflow model. For more details about how signatures work in MLflow see [Signatures in MLflow](concept-mlflow-models.md#signatures).
51+
52+
> [!TIP]
53+
> Signatures in MLflow models are optional but they are highly encouraged as they provide a convenient way to early detect data compatibility issues. For more information about how to log models with signatures read [Logging models with a custom signature, environment or samples](how-to-log-mlflow-models.md#logging-models-with-a-custom-signature-environment-or-samples).
54+
55+
56+
### Python packages and dependencies
57+
58+
Azure Machine Learning automatically generates environments to run inference of MLflow models. Those environments are built by reading the conda dependencies specified in the MLflow model. Azure Machine Learning also adds any required package to run the inferencing server, which will vary depending on the type of deployment you are doing.
59+
60+
__conda.yaml__
61+
62+
:::code language="yaml" source="~/azureml-examples-main/sdk/python/endpoints/online/mlflow/sklearn-diabetes/model/conda.yaml" highlight="13-19":::
63+
64+
> [!WARNING]
65+
> MLflow performs automatic package detection when logging models, and pins their versions in the conda dependencies of the model. However, such action is performed at the best of its knowledge and there may be cases when the detection doesn't reflect your intentions or requirements. On those cases consider [logging models with a custom conda dependencies definition](how-to-log-mlflow-models.md?#logging-models-with-a-custom-signature-environment-or-samples).
66+
67+
4268
## Deployment tools
4369

4470
Azure Machine Learning offers many ways to deploy MLflow models into Online and Batch endpoints. You can deploy models using the following tools:

articles/machine-learning/how-to-log-mlflow-models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class ModelWrapper(PythonModel):
231231

232232
self._encoder = pickle.loads(context.artifacts["encoder"])
233233
self._model = XGBClassifier(use_label_encoder=False, eval_metric="logloss")
234-
model.load_model(context.artifacts["model"])
234+
self._model.load_model(context.artifacts["model"])
235235

236236
def predict(self, context: PythonModelContext, data):
237237
return self._model.predict_proba(data)

articles/machine-learning/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@
629629
href: how-to-use-event-grid-batch.md
630630
- name: Use REST to deploy a model as batch endpoints
631631
href: how-to-deploy-batch-with-rest.md
632-
- name: Deploying MLflow models
632+
- name: MLflow guide
633633
items:
634634
- name: Guidelines for deploying MLflow models
635635
displayName: mlflow models deployment plugin

0 commit comments

Comments
 (0)