Skip to content

Commit eb0dd3a

Browse files
Merge pull request #216055 from santiagxf/santiagxf/aml-batch-patch
Update how-to-mlflow-batch.md
2 parents 9a0b5cb + 7b4d242 commit eb0dd3a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/machine-learning/batch-inference/how-to-mlflow-batch.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.reviewer: larryfr
1313
ms.custom: devplatv2
1414
---
1515

16-
# Using MLflow models in batch deployments
16+
# Use MLflow models in batch deployments
1717

1818
[!INCLUDE [cli v2](../../../includes/machine-learning-dev-v2.md)]
1919

@@ -43,7 +43,7 @@ The model has been trained using an `XGBBoost` classifier and all the required p
4343

4444
### Follow along in Jupyter Notebooks
4545

46-
You can follow along this sample in the following notebooks. In the cloned repository, open the notebook: `azureml-examples/sdk/python/endpoints/batch/mlflow-for-batch-tabular.ipynb`.
46+
You can follow along this sample in the following notebooks. In the cloned repository, open the notebook: [mlflow-for-batch-tabular.ipynb](https://github.com/Azure/azureml-examples/blob/main/sdk/python/endpoints/batch/mlflow-for-batch-tabular.ipynb).
4747

4848
## Steps
4949

@@ -455,17 +455,17 @@ Use the following steps to deploy an MLflow model with a custom scoring script.
455455
model = mlflow.pyfunc.load(model_path)
456456

457457
def run(mini_batch):
458-
resultList = []
458+
results = pd.DataFrame(columns=['file', 'predictions'])
459459

460460
for file_path in mini_batch:
461461
data = pd.read_csv(file_path)
462462
pred = model.predict(data)
463463

464464
df = pd.DataFrame(pred, columns=['predictions'])
465465
df['file'] = os.path.basename(file_path)
466-
resultList.extend(df.values)
466+
results = pd.concat([results, df])
467467

468-
return resultList
468+
return results
469469
```
470470

471471
1. Let's create an environment where the scoring script can be executed:

0 commit comments

Comments
 (0)