Skip to content

Commit 96c59d5

Browse files
committed
testing
1 parent ce3214b commit 96c59d5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/how-to-deploy-to-aci/how-to-deploy-to-aci.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
# PREREQ: load workspace info
88
# import azureml.core
9-
# <load-workspace>
9+
#region load-workspace
1010
from azureml.core import Workspace
1111
ws = Workspace.from_config()
12-
# </load-workspace>
12+
#endregion
1313

1414
scorepy_content = "import json\nimport numpy as np\nimport os\nimport pickle\nfrom sklearn.externals import joblib\nfrom sklearn.linear_model import LogisticRegression\n\nfrom azureml.core.model import Model\n\ndef init():\n global model\n # retreive the path to the model file using the model name\n model_path = Model.get_model_path('sklearn_mnist')\n model = joblib.load(model_path)\n\ndef run(raw_data):\n data = np.array(json.loads(raw_data)['data'])\n # make prediction\n y_hat = model.predict(data)\n return json.dumps(y_hat.tolist())"
1515
print(scorepy_content)
@@ -26,7 +26,7 @@
2626
with open("myenv.yml","w") as f:
2727
f.write(myenv.serialize_to_string())
2828

29-
# <config-image>
29+
#Region config-image
3030
from azureml.core.image import ContainerImage
3131

3232
image_config = ContainerImage.image_configuration(execution_script = "score.py",
@@ -35,7 +35,7 @@
3535
description = "Image with mnist model",
3636
tags = {"data": "mnist", "type": "classification"}
3737
)
38-
# </config-image>
38+
#End Region
3939

4040
# <config-aci>
4141
from azureml.core.webservice import AciWebservice
@@ -46,7 +46,7 @@
4646
description = 'Handwriting recognition')
4747
# </config-aci>
4848

49-
# <register-model>
49+
#<register-model>
5050
from azureml.core.model import Model
5151

5252
model_name = "sklearn_mnist"
@@ -55,7 +55,7 @@
5555
tags = {"data": "mnist", "type": "classification"},
5656
description = "Mnist handwriting recognition",
5757
workspace = ws)
58-
# </register-model>
58+
#</register-model>
5959

6060
# <retrieve-model>
6161
from azureml.core.model import Model

0 commit comments

Comments
 (0)