Skip to content

Commit 6bb1e2a

Browse files
committed
update samples from Release-146 as a part of 1.0.62 SDK release
1 parent e1724c8 commit 6bb1e2a

File tree

96 files changed

+11636
-2023
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+11636
-2023
lines changed

configuration.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"source": [
104104
"import azureml.core\n",
105105
"\n",
106-
"print(\"This notebook was created using version 1.0.60 of the Azure ML SDK\")\n",
106+
"print(\"This notebook was created using version 1.0.62 of the Azure ML SDK\")\n",
107107
"print(\"You are currently using version\", azureml.core.VERSION, \"of the Azure ML SDK\")"
108108
]
109109
},

how-to-use-azureml/automated-machine-learning/automl_env.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ dependencies:
2121
- azureml-train-automl
2222
- azureml-widgets
2323
- azureml-explain-model
24+
- azureml-contrib-explain-model
2425
- pandas_ml
2526

how-to-use-azureml/automated-machine-learning/automl_env_mac.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ dependencies:
2222
- azureml-train-automl
2323
- azureml-widgets
2424
- azureml-explain-model
25+
- azureml-contrib-explain-model
2526
- pandas_ml
2627

how-to-use-azureml/automated-machine-learning/classification-bank-marketing/auto-ml-classification-bank-marketing.ipynb

+2-20
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@
9292
"\n",
9393
"# choose a name for experiment\n",
9494
"experiment_name = 'automl-classification-bmarketing'\n",
95-
"# project folder\n",
96-
"project_folder = './sample_projects/automl-classification-bankmarketing'\n",
9795
"\n",
9896
"experiment=Experiment(ws, experiment_name)\n",
9997
"\n",
@@ -103,7 +101,6 @@
103101
"output['Workspace'] = ws.name\n",
104102
"output['Resource Group'] = ws.resource_group\n",
105103
"output['Location'] = ws.location\n",
106-
"output['Project Directory'] = project_folder\n",
107104
"output['Experiment Name'] = experiment.name\n",
108105
"pd.set_option('display.max_colwidth', -1)\n",
109106
"outputDf = pd.DataFrame(data = output, index = [''])\n",
@@ -164,20 +161,7 @@
164161
"source": [
165162
"# Data\n",
166163
"\n",
167-
"Here load the data in the get_data() script to be utilized in azure compute. To do this first load all the necessary libraries and dependencies to set up paths for the data and to create the conda_Run_config."
168-
]
169-
},
170-
{
171-
"cell_type": "code",
172-
"execution_count": null,
173-
"metadata": {},
174-
"outputs": [],
175-
"source": [
176-
"if not os.path.isdir('data'):\n",
177-
" os.mkdir('data')\n",
178-
" \n",
179-
"if not os.path.exists(project_folder):\n",
180-
" os.makedirs(project_folder)"
164+
"Create a run configuration for the remote run."
181165
]
182166
},
183167
{
@@ -207,7 +191,7 @@
207191
"source": [
208192
"### Load Data\n",
209193
"\n",
210-
"Here we create the script to be run in azure comput for loading the data, we load the bank marketing dataset into X_train and y_train. Next X_train and y_train is returned for training the model."
194+
"Load the bank marketing dataset into X_train and y_train. X_train contains the training features, which are inputs to the model. y_train contains the training labels, which are the expected output of the model."
211195
]
212196
},
213197
{
@@ -240,7 +224,6 @@
240224
"|**n_cross_validations**|Number of cross validation splits.|\n",
241225
"|**X**|(sparse) array-like, shape = [n_samples, n_features]|\n",
242226
"|**y**|(sparse) array-like, shape = [n_samples, ], Multi-class targets.|\n",
243-
"|**path**|Relative path to the project folder. AutoML stores configuration files for the experiment under this folder. You can specify a new empty folder.|\n",
244227
"\n",
245228
"**_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)"
246229
]
@@ -263,7 +246,6 @@
263246
"\n",
264247
"automl_config = AutoMLConfig(task = 'classification',\n",
265248
" debug_log = 'automl_errors.log',\n",
266-
" path = project_folder,\n",
267249
" run_configuration=conda_run_config,\n",
268250
" X = X_train,\n",
269251
" y = y_train,\n",

how-to-use-azureml/automated-machine-learning/classification-credit-card-fraud/auto-ml-classification-credit-card-fraud.ipynb

+3-21
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@
9292
"\n",
9393
"# choose a name for experiment\n",
9494
"experiment_name = 'automl-classification-ccard'\n",
95-
"# project folder\n",
96-
"project_folder = './sample_projects/automl-classification-creditcard'\n",
9795
"\n",
9896
"experiment=Experiment(ws, experiment_name)\n",
9997
"\n",
@@ -103,7 +101,6 @@
103101
"output['Workspace'] = ws.name\n",
104102
"output['Resource Group'] = ws.resource_group\n",
105103
"output['Location'] = ws.location\n",
106-
"output['Project Directory'] = project_folder\n",
107104
"output['Experiment Name'] = experiment.name\n",
108105
"pd.set_option('display.max_colwidth', -1)\n",
109106
"outputDf = pd.DataFrame(data = output, index = [''])\n",
@@ -164,20 +161,7 @@
164161
"source": [
165162
"# Data\n",
166163
"\n",
167-
"Here load the data in the get_data script to be utilized in azure compute. To do this, first load all the necessary libraries and dependencies to set up paths for the data and to create the conda_run_config."
168-
]
169-
},
170-
{
171-
"cell_type": "code",
172-
"execution_count": null,
173-
"metadata": {},
174-
"outputs": [],
175-
"source": [
176-
"if not os.path.isdir('data'):\n",
177-
" os.mkdir('data')\n",
178-
" \n",
179-
"if not os.path.exists(project_folder):\n",
180-
" os.makedirs(project_folder)"
164+
"Create a run configuration for the remote run."
181165
]
182166
},
183167
{
@@ -207,7 +191,7 @@
207191
"source": [
208192
"### Load Data\n",
209193
"\n",
210-
"Here create the script to be run in azure compute for loading the data, load the credit card dataset into cards and store the Class column (y) in the y variable and store the remaining data in the x variable. Next split the data using random_split and return X_train and y_train for training the model."
194+
"Load the credit card dataset into X and y. X contains the features, which are inputs to the model. y contains the labels, which are the expected output of the model. Next split the data using random_split and return X_train and y_train for training the model."
211195
]
212196
},
213197
{
@@ -241,7 +225,6 @@
241225
"|**n_cross_validations**|Number of cross validation splits.|\n",
242226
"|**X**|(sparse) array-like, shape = [n_samples, n_features]|\n",
243227
"|**y**|(sparse) array-like, shape = [n_samples, ], Multi-class targets.|\n",
244-
"|**path**|Relative path to the project folder. AutoML stores configuration files for the experiment under this folder. You can specify a new empty folder.|\n",
245228
"\n",
246229
"**_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)"
247230
]
@@ -270,8 +253,7 @@
270253
"}\n",
271254
"\n",
272255
"automl_config = AutoMLConfig(task = 'classification',\n",
273-
" debug_log = 'automl_errors_20190417.log',\n",
274-
" path = project_folder,\n",
256+
" debug_log = 'automl_errors.log',\n",
275257
" run_configuration=conda_run_config,\n",
276258
" X = X_train,\n",
277259
" y = y_train,\n",

how-to-use-azureml/automated-machine-learning/classification-with-deployment/auto-ml-classification-with-deployment.ipynb

+2-7
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@
9292
"\n",
9393
"# choose a name for experiment\n",
9494
"experiment_name = 'automl-classification-deployment'\n",
95-
"# project folder\n",
96-
"project_folder = './sample_projects/automl-classification-deployment'\n",
9795
"\n",
9896
"experiment=Experiment(ws, experiment_name)\n",
9997
"\n",
@@ -103,7 +101,6 @@
103101
"output['Workspace'] = ws.name\n",
104102
"output['Resource Group'] = ws.resource_group\n",
105103
"output['Location'] = ws.location\n",
106-
"output['Project Directory'] = project_folder\n",
107104
"output['Experiment Name'] = experiment.name\n",
108105
"pd.set_option('display.max_colwidth', -1)\n",
109106
"outputDf = pd.DataFrame(data = output, index = [''])\n",
@@ -126,8 +123,7 @@
126123
"|**iterations**|Number of iterations. In each iteration AutoML trains a specific pipeline with the data.|\n",
127124
"|**n_cross_validations**|Number of cross validation splits.|\n",
128125
"|**X**|(sparse) array-like, shape = [n_samples, n_features]|\n",
129-
"|**y**|(sparse) array-like, shape = [n_samples, ], Multi-class targets.|\n",
130-
"|**path**|Relative path to the project folder. AutoML stores configuration files for the experiment under this folder. You can specify a new empty folder.|"
126+
"|**y**|(sparse) array-like, shape = [n_samples, ], Multi-class targets.|"
131127
]
132128
},
133129
{
@@ -148,8 +144,7 @@
148144
" iterations = 10,\n",
149145
" verbosity = logging.INFO,\n",
150146
" X = X_train, \n",
151-
" y = y_train,\n",
152-
" path = project_folder)"
147+
" y = y_train)"
153148
]
154149
},
155150
{

how-to-use-azureml/automated-machine-learning/classification-with-onnx/auto-ml-classification-with-onnx.ipynb

+4-10
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@
8989
"source": [
9090
"ws = Workspace.from_config()\n",
9191
"\n",
92-
"# Choose a name for the experiment and specify the project folder.\n",
92+
"# Choose a name for the experiment.\n",
9393
"experiment_name = 'automl-classification-onnx'\n",
94-
"project_folder = './sample_projects/automl-classification-onnx'\n",
9594
"\n",
9695
"experiment = Experiment(ws, experiment_name)\n",
9796
"\n",
@@ -101,7 +100,6 @@
101100
"output['Workspace Name'] = ws.name\n",
102101
"output['Resource Group'] = ws.resource_group\n",
103102
"output['Location'] = ws.location\n",
104-
"output['Project Directory'] = project_folder\n",
105103
"output['Experiment Name'] = experiment.name\n",
106104
"pd.set_option('display.max_colwidth', -1)\n",
107105
"outputDf = pd.DataFrame(data = output, index = [''])\n",
@@ -127,9 +125,7 @@
127125
"X_train, X_test, y_train, y_test = train_test_split(iris.data, \n",
128126
" iris.target, \n",
129127
" test_size=0.2, \n",
130-
" random_state=0)\n",
131-
"\n",
132-
"\n"
128+
" random_state=0)"
133129
]
134130
},
135131
{
@@ -170,8 +166,7 @@
170166
"|**iterations**|Number of iterations. In each iteration AutoML trains a specific pipeline with the data.|\n",
171167
"|**X**|(sparse) array-like, shape = [n_samples, n_features]|\n",
172168
"|**y**|(sparse) array-like, shape = [n_samples, ], Multi-class targets.|\n",
173-
"|**enable_onnx_compatible_models**|Enable the ONNX compatible models in the experiment.|\n",
174-
"|**path**|Relative path to the project folder. AutoML stores configuration files for the experiment under this folder. You can specify a new empty folder.|"
169+
"|**enable_onnx_compatible_models**|Enable the ONNX compatible models in the experiment.|"
175170
]
176171
},
177172
{
@@ -196,8 +191,7 @@
196191
" X = X_train, \n",
197192
" y = y_train,\n",
198193
" preprocess=True,\n",
199-
" enable_onnx_compatible_models=True,\n",
200-
" path = project_folder)"
194+
" enable_onnx_compatible_models=True)"
201195
]
202196
},
203197
{

how-to-use-azureml/automated-machine-learning/classification-with-whitelisting/auto-ml-classification-with-whitelisting.ipynb

+2-6
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,8 @@
100100
"source": [
101101
"ws = Workspace.from_config()\n",
102102
"\n",
103-
"# Choose a name for the experiment and specify the project folder.\n",
103+
"# Choose a name for the experiment.\n",
104104
"experiment_name = 'automl-local-whitelist'\n",
105-
"project_folder = './sample_projects/automl-local-whitelist'\n",
106105
"\n",
107106
"experiment = Experiment(ws, experiment_name)\n",
108107
"\n",
@@ -112,7 +111,6 @@
112111
"output['Workspace Name'] = ws.name\n",
113112
"output['Resource Group'] = ws.resource_group\n",
114113
"output['Location'] = ws.location\n",
115-
"output['Project Directory'] = project_folder\n",
116114
"output['Experiment Name'] = experiment.name\n",
117115
"pd.set_option('display.max_colwidth', -1)\n",
118116
"outputDf = pd.DataFrame(data = output, index = [''])\n",
@@ -158,7 +156,6 @@
158156
"|**n_cross_validations**|Number of cross validation splits.|\n",
159157
"|**X**|(sparse) array-like, shape = [n_samples, n_features]|\n",
160158
"|**y**|(sparse) array-like, shape = [n_samples, ], Multi-class targets.|\n",
161-
"|**path**|Relative path to the project folder. AutoML stores configuration files for the experiment under this folder. You can specify a new empty folder.|\n",
162159
"|**whitelist_models**|List of models that AutoML should use. The possible values are listed [here](https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-configure-auto-train#configure-your-experiment-settings).|"
163160
]
164161
},
@@ -177,8 +174,7 @@
177174
" X = X_train, \n",
178175
" y = y_train,\n",
179176
" enable_tf=True,\n",
180-
" whitelist_models=whitelist_models,\n",
181-
" path = project_folder)"
177+
" whitelist_models=whitelist_models)"
182178
]
183179
},
184180
{

how-to-use-azureml/automated-machine-learning/classification/auto-ml-classification.ipynb

+1-3
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@
113113
"source": [
114114
"ws = Workspace.from_config()\n",
115115
"\n",
116-
"# Choose a name for the experiment and specify the project folder.\n",
116+
"# Choose a name for the experiment.\n",
117117
"experiment_name = 'automl-classification'\n",
118-
"project_folder = './sample_projects/automl-classification'\n",
119118
"\n",
120119
"experiment = Experiment(ws, experiment_name)\n",
121120
"\n",
@@ -125,7 +124,6 @@
125124
"output['Workspace Name'] = ws.name\n",
126125
"output['Resource Group'] = ws.resource_group\n",
127126
"output['Location'] = ws.location\n",
128-
"output['Project Directory'] = project_folder\n",
129127
"output['Experiment Name'] = experiment.name\n",
130128
"pd.set_option('display.max_colwidth', -1)\n",
131129
"outputDf = pd.DataFrame(data = output, index = [''])\n",

how-to-use-azureml/automated-machine-learning/dataset-remote-execution/auto-ml-dataset-remote-execution.ipynb

-4
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@
8787
"\n",
8888
"# choose a name for experiment\n",
8989
"experiment_name = 'automl-dataset-remote-bai'\n",
90-
"# project folder\n",
91-
"project_folder = './sample_projects/automl-dataprep-remote-bai'\n",
9290
" \n",
9391
"experiment = Experiment(ws, experiment_name)\n",
9492
" \n",
@@ -98,7 +96,6 @@
9896
"output['Workspace Name'] = ws.name\n",
9997
"output['Resource Group'] = ws.resource_group\n",
10098
"output['Location'] = ws.location\n",
101-
"output['Project Directory'] = project_folder\n",
10299
"output['Experiment Name'] = experiment.name\n",
103100
"pd.set_option('display.max_colwidth', -1)\n",
104101
"outputDf = pd.DataFrame(data = output, index = [''])\n",
@@ -253,7 +250,6 @@
253250
"source": [
254251
"automl_config = AutoMLConfig(task = 'classification',\n",
255252
" debug_log = 'automl_errors.log',\n",
256-
" path = project_folder,\n",
257253
" run_configuration=conda_run_config,\n",
258254
" X = X,\n",
259255
" y = y,\n",

how-to-use-azureml/automated-machine-learning/dataset/auto-ml-dataset.ipynb

-3
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@
8787
" \n",
8888
"# choose a name for experiment\n",
8989
"experiment_name = 'automl-dataset-local'\n",
90-
"# project folder\n",
91-
"project_folder = './sample_projects/automl-dataset-local'\n",
9290
" \n",
9391
"experiment = Experiment(ws, experiment_name)\n",
9492
" \n",
@@ -98,7 +96,6 @@
9896
"output['Workspace Name'] = ws.name\n",
9997
"output['Resource Group'] = ws.resource_group\n",
10098
"output['Location'] = ws.location\n",
101-
"output['Project Directory'] = project_folder\n",
10299
"output['Experiment Name'] = experiment.name\n",
103100
"pd.set_option('display.max_colwidth', -1)\n",
104101
"outputDf = pd.DataFrame(data = output, index = [''])\n",

how-to-use-azureml/automated-machine-learning/forecasting-bike-share/auto-ml-forecasting-bike-share.ipynb

+1-6
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@
9797
"\n",
9898
"# choose a name for the run history container in the workspace\n",
9999
"experiment_name = 'automl-bikeshareforecasting'\n",
100-
"# project folder\n",
101-
"project_folder = './sample_projects/automl-local-bikeshareforecasting'\n",
102100
"\n",
103101
"experiment = Experiment(ws, experiment_name)\n",
104102
"\n",
@@ -108,7 +106,6 @@
108106
"output['Workspace'] = ws.name\n",
109107
"output['Resource Group'] = ws.resource_group\n",
110108
"output['Location'] = ws.location\n",
111-
"output['Project Directory'] = project_folder\n",
112109
"output['Run History Name'] = experiment_name\n",
113110
"pd.set_option('display.max_colwidth', -1)\n",
114111
"outputDf = pd.DataFrame(data = output, index = [''])\n",
@@ -225,7 +222,6 @@
225222
"|**y**|(sparse) array-like, shape = [n_samples, ], targets values.|\n",
226223
"|**n_cross_validations**|Number of cross validation splits.|\n",
227224
"|**country_or_region**|The country/region used to generate holiday features. These should be ISO 3166 two-letter country/region codes (i.e. 'US', 'GB').|\n",
228-
"|**path**|Relative path to the project folder. AutoML stores configuration files for the experiment under this folder. You can specify a new empty folder. \n",
229225
"\n",
230226
"This notebook uses the blacklist_models parameter to exclude some models that take a longer time to train on this dataset. You can choose to remove models from the blacklist_models list but you may need to increase the iteration_timeout_minutes parameter value to get results."
231227
]
@@ -253,8 +249,7 @@
253249
" iteration_timeout_minutes=5,\n",
254250
" X=X_train,\n",
255251
" y=y_train,\n",
256-
" n_cross_validations=3, \n",
257-
" path=project_folder,\n",
252+
" n_cross_validations=3,\n",
258253
" verbosity=logging.INFO,\n",
259254
" **automl_settings)"
260255
]

0 commit comments

Comments
 (0)