mirror of
https://github.com/Azure/MachineLearningNotebooks.git
synced 2025-12-19 17:17:04 -05:00
Merge pull request #1262 from Azure/release_update/Release-80
update samples from Release-80 as a part of SDK release
This commit is contained in:
@@ -199,6 +199,7 @@
|
|||||||
"|**n_cross_validations**|Number of cross validation splits.|\n",
|
"|**n_cross_validations**|Number of cross validation splits.|\n",
|
||||||
"|**training_data**|(sparse) array-like, shape = [n_samples, n_features]|\n",
|
"|**training_data**|(sparse) array-like, shape = [n_samples, n_features]|\n",
|
||||||
"|**label_column_name**|(sparse) array-like, shape = [n_samples, ], targets values.|\n",
|
"|**label_column_name**|(sparse) array-like, shape = [n_samples, ], targets values.|\n",
|
||||||
|
"|**scenario**|We need to set this parameter to 'Latest' to enable some experimental features. This parameter should not be set outside of this experimental notebook.|\n",
|
||||||
"\n",
|
"\n",
|
||||||
"**_You can find more information about primary metrics_** [here](https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-configure-auto-train#primary-metric)"
|
"**_You can find more information about primary metrics_** [here](https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-configure-auto-train#primary-metric)"
|
||||||
]
|
]
|
||||||
@@ -227,6 +228,7 @@
|
|||||||
" compute_target = compute_target,\n",
|
" compute_target = compute_target,\n",
|
||||||
" training_data = train_data,\n",
|
" training_data = train_data,\n",
|
||||||
" label_column_name = label,\n",
|
" label_column_name = label,\n",
|
||||||
|
" scenario='Latest',\n",
|
||||||
" **automl_settings\n",
|
" **automl_settings\n",
|
||||||
" )"
|
" )"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -276,16 +276,17 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from azureml.exceptions import ComputeTargetException\n",
|
"from azureml.core.compute import ComputeTarget, AksCompute\n",
|
||||||
|
"from azureml.core.compute_target import ComputeTargetException\n",
|
||||||
"\n",
|
"\n",
|
||||||
"aks_name = \"my-aks\"\n",
|
"aks_name = \"my-aks-insights\"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"creating_compute = False\n",
|
"creating_compute = False\n",
|
||||||
"try:\n",
|
"try:\n",
|
||||||
" aks_target = ComputeTarget(ws, aks_name)\n",
|
" aks_target = ComputeTarget(ws, aks_name)\n",
|
||||||
" print(\"Using existing AKS cluster {}.\".format(aks_name))\n",
|
" print(\"Using existing AKS compute target {}.\".format(aks_name))\n",
|
||||||
"except ComputeTargetException:\n",
|
"except ComputeTargetException:\n",
|
||||||
" print(\"Creating a new AKS cluster {}.\".format(aks_name))\n",
|
" print(\"Creating a new AKS compute target {}.\".format(aks_name))\n",
|
||||||
"\n",
|
"\n",
|
||||||
" # Use the default configuration (can also provide parameters to customize).\n",
|
" # Use the default configuration (can also provide parameters to customize).\n",
|
||||||
" prov_config = AksCompute.provisioning_configuration()\n",
|
" prov_config = AksCompute.provisioning_configuration()\n",
|
||||||
@@ -302,7 +303,7 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"%%time\n",
|
"%%time\n",
|
||||||
"if creating_compute:\n",
|
"if creating_compute and aks_target.provisioning_state != \"Succeeded\":\n",
|
||||||
" aks_target.wait_for_completion(show_output=True)"
|
" aks_target.wait_for_completion(show_output=True)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -382,7 +383,7 @@
|
|||||||
" aks_service.wait_for_deployment(show_output=True)\n",
|
" aks_service.wait_for_deployment(show_output=True)\n",
|
||||||
" print(aks_service.state)\n",
|
" print(aks_service.state)\n",
|
||||||
"else:\n",
|
"else:\n",
|
||||||
" raise ValueError(\"AKS provisioning failed. Error: \", aks_service.error)"
|
" raise ValueError(\"AKS cluster provisioning failed. Error: \", aks_target.provisioning_errors)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -460,7 +461,9 @@
|
|||||||
"%%time\n",
|
"%%time\n",
|
||||||
"aks_service.delete()\n",
|
"aks_service.delete()\n",
|
||||||
"aci_service.delete()\n",
|
"aci_service.delete()\n",
|
||||||
"model.delete()"
|
"model.delete()\n",
|
||||||
|
"if creating_compute:\n",
|
||||||
|
" aks_target.delete()"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user