mirror of
https://github.com/Azure/MachineLearningNotebooks.git
synced 2025-12-21 18:15:13 -05:00
change deployment to model-centric approach
This commit is contained in:
@@ -412,18 +412,17 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"%%time\n",
|
"%%time\n",
|
||||||
"from azureml.core.webservice import Webservice\n",
|
"from azureml.core.webservice import Webservice\n",
|
||||||
"from azureml.core.image import ContainerImage\n",
|
"from azureml.core.model import InferenceConfig\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# configure the image\n",
|
"inference_config = InferenceConfig(runtime= \"python\", \n",
|
||||||
"image_config = ContainerImage.image_configuration(execution_script=\"score.py\", \n",
|
" entry_script=\"score.py\",\n",
|
||||||
" runtime=\"python\", \n",
|
|
||||||
" conda_file=\"myenv.yml\")\n",
|
" conda_file=\"myenv.yml\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"service = Webservice.deploy_from_model(workspace=ws,\n",
|
"service = Model.deploy(workspace=ws, \n",
|
||||||
" name='sklearn-mnist-svc', \n",
|
" name='sklearn-mnist-svc', \n",
|
||||||
" deployment_config=aciconfig,\n",
|
|
||||||
" models=[model], \n",
|
" models=[model], \n",
|
||||||
" image_config=image_config)\n",
|
" inference_config=inference_config, \n",
|
||||||
|
" deployment_config=aciconfig)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"service.wait_for_deployment(show_output=True)"
|
"service.wait_for_deployment(show_output=True)"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user