Skip to content

Commit e9acdeb

Browse files
authored
Merge pull request #107674 from Blackmist/master
adding info about finding files
2 parents 596eb94 + 1cc36ab commit e9acdeb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/machine-learning/tutorial-convert-ml-experiment-to-production.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: bjcmit
66
ms.author: brysmith
77
ms.service: machine-learning
88
ms.topic: tutorial
9-
ms.date: 02/10/2020
9+
ms.date: 03/13/2020
1010
---
1111

1212
# Tutorial: Convert ML experimental code to production code
@@ -25,7 +25,7 @@ In this tutorial, you learn how to:
2525
## Prerequisites
2626

2727
- Generate the [MLOpsPython template](https://github.com/microsoft/MLOpsPython/generate)
28-
and use the `experimentation/Diabetes Ridge Regression Training.ipynb` and `experimentation/Diabetes Ridge Regression Scoring.ipynb` notebooks. These notebooks are used as an example of converting from experimentation to production.
28+
and use the `experimentation/Diabetes Ridge Regression Training.ipynb` and `experimentation/Diabetes Ridge Regression Scoring.ipynb` notebooks. These notebooks are used as an example of converting from experimentation to production. You can find these notebooks at [https://github.com/microsoft/MLOpsPython/tree/master/experimentation](https://github.com/microsoft/MLOpsPython/tree/master/experimentation).
2929
- Install nbconvert. Follow only the installation instructions under section __Installing nbconvert__ on the [Installation](https://nbconvert.readthedocs.io/en/latest/install.html) page.
3030

3131
## Remove all nonessential code
@@ -70,7 +70,7 @@ Second, the Jupyter code needs to be refactored into functions. Refactoring code
7070
In `experimentation/Diabetes Ridge Regression Training.ipynb`, complete the following steps:
7171

7272
1. Create a function called `train_model`, which takes the parameters `data` and `alpha` and returns a model.
73-
1. Copy the code under the headings Train Model on Training Set and Validate Model on Validation Set into the `train_model` function.
73+
1. Copy the code under the headings "Train Model on Training Set" and "Validate Model on Validation Set" into the `train_model` function.
7474

7575
The `train_model` function should look like the following code:
7676

@@ -84,7 +84,7 @@ def train_model(data, alpha):
8484
return reg
8585
```
8686

87-
Once the `train_model` function is created, replace the code under the headings Train Model on Training Set and Validate Model on Validation Set with the following statement:
87+
Once the `train_model` function is created, replace the code under the headings "Train Model on Training Set" and "Validate Model on Validation Set" with the following statement:
8888

8989
```python
9090
reg = train_model(data, alpha)
@@ -95,7 +95,7 @@ The previous statement calls the `train_model` function passing the `data` and `
9595
In `experimentation/Diabetes Ridge Regression Training.ipynb`, complete the following steps:
9696

9797
1. Create a new function called `main`, which takes no parameters and returns nothing.
98-
1. Copy the code under the headings Load Data”, “Split Data into Training and Validation Sets, and Save Model into the `main` function.
98+
1. Copy the code under the headings "Load Data", "Split Data into Training and Validation Sets", and "Save Model" into the `main` function.
9999
1. Copy the newly created call to `train_model` into the `main` function.
100100

101101
The `main` function should look like the following code:
@@ -118,7 +118,7 @@ def main():
118118
joblib.dump(value=reg, filename=model_name)
119119
```
120120

121-
Once the `main` function is created, replace all the code under the headings Load Data”, “Split Data into Training and Validation Sets, and Save Model along with the newly created call to `train_model` with the following statement:
121+
Once the `main` function is created, replace all the code under the headings "Load Data", "Split Data into Training and Validation Sets", and "Save Model" along with the newly created call to `train_model` with the following statement:
122122

123123
```python
124124
main()
@@ -166,7 +166,7 @@ main()
166166
In `experimentation/Diabetes Ridge Regression Scoring.ipynb`, complete the following steps:
167167

168168
1. Create a new function called `init`, which takes no parameters and return nothing.
169-
1. Copy the code under the Load Model heading into the `init` function.
169+
1. Copy the code under the "Load Model" heading into the `init` function.
170170

171171
The `init` function should look like the following code:
172172

@@ -177,7 +177,7 @@ def init():
177177
model = joblib.load(model_path)
178178
```
179179

180-
Once the `init` function has been created, replace all the code under the heading Load Model with a single call to `init` as follows:
180+
Once the `init` function has been created, replace all the code under the heading "Load Model" with a single call to `init` as follows:
181181

182182
```python
183183
init()
@@ -191,7 +191,7 @@ In `experimentation/Diabetes Ridge Regression Scoring.ipynb`, complete the follo
191191
{"result": result.tolist()}
192192
```
193193

194-
1. Copy the code under the Prepare Data and Score Data headings into the `run` function.
194+
1. Copy the code under the "Prepare Data" and "Score Data" headings into the `run` function.
195195

196196
The `run` function should look like the following code (Remember to remove the statements that set the variables `raw_data` and `request_headers`, which will be used later when the `run` function is called):
197197

@@ -204,7 +204,7 @@ In `experimentation/Diabetes Ridge Regression Scoring.ipynb`, complete the follo
204204
return {"result": result.tolist()}
205205
```
206206

207-
Once the `run` function has been created, replace all the code under the Prepare Data and Score Data headings with the following code:
207+
Once the `run` function has been created, replace all the code under the "Prepare Data" and "Score Data" headings with the following code:
208208

209209
```python
210210
raw_data = '{"data":[[1,2,3,4,5,6,7,8,9,10],[10,9,8,7,6,5,4,3,2,1]]}'

0 commit comments

Comments
 (0)