Skip to content

Commit e6f4215

Browse files
Merge pull request #179924 from Blackmist/11891786-verbatims
fixing verbatims
2 parents 79cc56e + 6ad97f2 commit e6f4215

File tree

3 files changed

+16
-79
lines changed

3 files changed

+16
-79
lines changed

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

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ For more information, see the documentation for the [Model class](/python/api/az
153153
+ Register a model from an `azureml.train.automl.run.AutoMLRun` object:
154154

155155
```python
156-
description = 'My AutoML Model'
157-
model = run.register_model(description = description,
158-
tags={'area': 'qna'})
156+
description = 'My AutoML Model'
157+
model = run.register_model(description = description,
158+
tags={'area': 'qna'})
159159

160-
print(run.model_id)
160+
print(run.model_id)
161161
```
162162

163163
In this example, the `metric` and `iteration` parameters aren't specified, so the iteration with the best primary metric will be registered. The `model_id` value returned from the run is used instead of a model name.
@@ -170,8 +170,18 @@ For more information, see the documentation for the [Model class](/python/api/az
170170

171171
## Define a dummy entry script
172172

173-
[!INCLUDE [write entry script](../../includes/machine-learning-dummy-entry-script.md)]
173+
The entry script receives data submitted to a deployed web service and passes it to the model. It then returns the model's response to the client. *The script is specific to your model*. The entry script must understand the data that the model expects and returns.
174174

175+
The two things you need to accomplish in your entry script are:
176+
177+
1. Loading your model (using a function called `init()`)
178+
1. Running your model on input data (using a function called `run()`)
179+
180+
For your initial deployment, use a dummy entry script that prints the data it receives.
181+
182+
:::code language="python" source="~/azureml-examples-main/python-sdk/tutorials/deploy-local/source_dir/echo_score.py":::
183+
184+
Save this file as `echo_score.py` inside of a directory called `source_dir`. This dummy script returns the data you send to it, so it doesn't use the model. But it is useful for testing that the scoring script is running.
175185

176186
## Define an inference configuration
177187

@@ -301,7 +311,7 @@ python_packages = ['nltk', 'numpy', 'onnxruntime']
301311
for package in python_packages:
302312
env.python.conda_dependencies.add_pip_package(package)
303313

304-
inf_config = InferenceConfig(environment=env, source_directory='./source_dir', entry_script='./score.py')
314+
inference_config = InferenceConfig(environment=env, source_directory='./source_dir', entry_script='./score.py')
305315
```
306316

307317
For more information, see the documentation for [LocalWebservice](/python/api/azureml-core/azureml.core.webservice.local.localwebservice), [Model.deploy()](/python/api/azureml-core/azureml.core.model.model#deploy-workspace--name--models--inference-config-none--deployment-config-none--deployment-target-none--overwrite-false-), and [Webservice](/python/api/azureml-core/azureml.core.webservice.webservice).

includes/machine-learning-deploy-service.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

includes/machine-learning-dummy-entry-script.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)