You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/how-to-deploy-to-aci/how-to-deploy-to-aci.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,10 @@
7
7
# PREREQ: load workspace info
8
8
# import azureml.core
9
9
10
-
# <load>
10
+
# <loadWorkspace>
11
11
fromazureml.coreimportWorkspace
12
12
ws=Workspace.from_config()
13
-
# </load>
13
+
# </loadWorkspace>
14
14
15
15
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())"
0 commit comments