Skip to content

Commit 71206fe

Browse files
authored
Update how-to-deploy-and-where.md
1 parent 46f3ba4 commit 71206fe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

articles/machine-learning/service/how-to-deploy-and-where.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,17 @@ The script contains two functions that load and run the model:
112112

113113
* `run(input_data)`: This function uses the model to predict a value based on the input data. Inputs and outputs to the run typically use JSON for serialization and de-serialization. You can also work with raw binary data. You can transform the data before sending to the model, or before returning to the client.
114114

115+
#### What is model_path?
116+
In Azure ML, we use a function called get_model_path to retrieve the local location of your model.
117+
When you register a model, you give it a name which corresponds to where the model is placed, either locally or during service deployment.
118+
119+
When you use this function, keep in mind that it is looking for this file and local path, first in the official path for Azure ML models, then locally.
120+
121+
The below example will return a path to a file called 'sklearn_mnist_model.pkl' (which was registered with the name 'sklearn_mnist')
122+
```
123+
model_path = Model.get_model_path('sklearn_mnist')
124+
```
125+
115126
#### (Optional) Automatic Swagger schema generation
116127

117128
To automatically generate a schema for your web service, provide a sample of the input and/or output in the constructor for one of the defined type objects, and the type and sample are used to automatically create the schema. Azure Machine Learning service then creates an [OpenAPI](https://swagger.io/docs/specification/about/) (Swagger) specification for the web service during deployment.

0 commit comments

Comments
 (0)