New SDK version

This commit is contained in:
Roope Astala
2018-11-05 15:27:36 -05:00
parent 32102e2aac
commit 7339c95ea0
46 changed files with 8200 additions and 4614 deletions

View File

@@ -159,8 +159,8 @@
"autoscale_enabled = os.environ.get(\"BATCHAI_CLUSTER_AUTOSCALE_ENABLED\", True)\n",
"\n",
"\n",
"if batchai_cluster_name in ws.compute_targets():\n",
" compute_target = ws.compute_targets()[batchai_cluster_name]\n",
"if batchai_cluster_name in ws.compute_targets:\n",
" compute_target = ws.compute_targets[batchai_cluster_name]\n",
" if compute_target and type(compute_target) is BatchAiCompute:\n",
" print('found compute target. just use it. ' + batchai_cluster_name)\n",
"else:\n",

View File

@@ -134,7 +134,7 @@
"\n",
"ws = Workspace.from_config()\n",
"model=Model(ws, 'sklearn_mnist')\n",
"model.download(target_dir = '.')\n",
"model.download(target_dir='.', exists_ok=True)\n",
"import os \n",
"# verify the downloaded model file\n",
"os.stat('./sklearn_mnist_model.pkl')"
@@ -210,7 +210,7 @@
"\n",
"conf_mx = confusion_matrix(y_test, y_hat)\n",
"print(conf_mx)\n",
"print('Overall accuracy:', np.average(y_hat==y_test))"
"print('Overall accuracy:', np.average(y_hat == y_test))"
]
},
{
@@ -478,7 +478,7 @@
"sample_indices = np.random.permutation(X_test.shape[0])[0:n]\n",
"\n",
"test_samples = json.dumps({\"data\": X_test[sample_indices].tolist()})\n",
"test_samples = bytes(test_samples, encoding = 'utf8')\n",
"test_samples = bytes(test_samples, encoding='utf8')\n",
"\n",
"# predict using the deployed model\n",
"result = service.run(input_data=test_samples)\n",

View File

@@ -424,4 +424,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}