You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -377,6 +382,9 @@ Use the following steps to deploy an MLflow model with a custom scoring script.
377
382
> [!TIP]
378
383
> The previous scoring script is provided as an example about how to perform inference of an MLflow model. You can adapt this example to your needs or change any of its parts to reflect your scenario.
379
384
385
+
> [!WARNING]
386
+
> __MLflow 2.0 advisory__: The provided scoring script will work with both MLflow 1.X and MLflow 2.X. However, be advised that the expected input/output formats on those versions may vary. Check the environment definition used to ensure you are using the expected MLflow version. Notice that MLflow 2.0is only supported in Python 3.8+.
387
+
380
388
1. Let's create an environment where the scoring script can be executed. Since our model is MLflow, the conda requirements are also specified in the model package (for more details about MLflow models and the files included on it see The MLmodel format). We are going then to build the environment using the conda dependencies from the file. However, we need also to include the package `azureml-inference-server-http` which is required for Online Deployments in Azure Machine Learning.
381
389
382
390
The conda definition file looks as follows:
@@ -485,34 +493,9 @@ Use the following steps to deploy an MLflow model with a custom scoring script.
485
493
486
494
1. Once your deployment completes, your deployment is ready to serve request. One of the easier ways to test the deployment is by using a sample request file along with the `invoke` method.
487
495
488
-
**sample-request-sklearn-custom.json**
496
+
**sample-request-sklearn.json**
489
497
490
-
```json
491
-
{
492
-
"dataframe_split": {
493
-
"columns": [
494
-
"age",
495
-
"sex",
496
-
"bmi",
497
-
"bp",
498
-
"s1",
499
-
"s2",
500
-
"s3",
501
-
"s4",
502
-
"s5",
503
-
"s6"
504
-
],
505
-
"data": [
506
-
[ 1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0 ],
507
-
[ 10.0,2.0,9.0,8.0,7.0,6.0,5.0,4.0,3.0,2.0]
508
-
],
509
-
"index": [0,1]
510
-
}
511
-
}
512
-
```
513
-
514
-
> [!NOTE]
515
-
> Notice how the key `dataframe_split` has been used in this example instead of `input_data`. This is because we are using an MLflow method `infer_and_parse_json_input` which uses the keys expected by MLflow serving (see [MLflow built-in deployment tools](https://www.mlflow.org/docs/latest/models.html#deploy-mlflow-models) for more input examples and formats). If you change the login in the scoring script, then the payload may be affected.
0 commit comments