update samples from Release-117 as a part of SDK release

This commit is contained in:
amlrelsa-ms
2021-12-13 16:57:22 +00:00
parent 352adb7487
commit dd494e9cac
58 changed files with 2355 additions and 253 deletions

View File

@@ -145,7 +145,7 @@
"source": [
"from sklearn.linear_model import Ridge\n",
"from sklearn.metrics import mean_squared_error\n",
"from sklearn.externals import joblib\n",
"import joblib\n",
"import math\n",
"\n",
"alphas = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]\n",

View File

@@ -156,7 +156,7 @@
"\n",
"### Create scoring script\n",
"\n",
"Create the scoring script, called score.py, used by the web service call to show how to use the model.\n",
"Create the scoring script, called score_encrypted.py, used by the web service call to show how to use the model.\n",
"\n",
"You must include two required functions into the scoring script:\n",
"* The `init()` function, which typically loads the model into a global object. This function is run only once when the Docker container is started. \n",
@@ -171,7 +171,7 @@
"metadata": {},
"outputs": [],
"source": [
"%%writefile score.py\n",
"%%writefile score_encrypted.py\n",
"import json\n",
"import os\n",
"import pickle\n",
@@ -252,7 +252,7 @@
"\n",
"1. Create environment object containing dependencies needed by the model using the environment file (`myenv.yml`)\n",
"1. Create inference configuration necessary to deploy the model as a web service using:\n",
" * The scoring file (`score.py`)\n",
" * The scoring file (`score_encrypted.py`)\n",
" * envrionment object created in previous step\n",
"1. Deploy the model to the ACI container.\n",
"1. Get the web service HTTP endpoint."
@@ -283,7 +283,7 @@
"model = Model(ws, 'sklearn_mnist')\n",
"\n",
"myenv = Environment.get(workspace=ws, name=\"tutorial-encryption-env\")\n",
"inference_config = InferenceConfig(entry_script=\"score.py\", environment=myenv)\n",
"inference_config = InferenceConfig(entry_script=\"score_encrypted.py\", environment=myenv)\n",
"\n",
"service_name = 'sklearn-mnist-svc-' + str(uuid.uuid4())[:4]\n",
"service = Model.deploy(workspace=ws, \n",