Skip to content

Commit 0040644

Browse files
committed
update samples from Release-163 as a part of 1.0.79 SDK release
1 parent 8aa0430 commit 0040644

File tree

20 files changed

+1306
-46
lines changed

20 files changed

+1306
-46
lines changed

configuration.ipynb

Lines changed: 1 addition & 1 deletion
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.76.2 of the Azure ML SDK\")\n",
106+
"print(\"This notebook was created using version 1.0.79 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/forecasting-bike-share/auto-ml-forecasting-bike-share.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
"outputs": [],
203203
"source": [
204204
"dataset = Dataset.Tabular.from_delimited_files(path = [(datastore, 'dataset/bike-no.csv')]).with_timestamp_columns(fine_grain_timestamp=time_column_name) \n",
205-
"dataset.take(5).to_pandas_dataframe()"
205+
"dataset.take(5).to_pandas_dataframe().reset_index(drop=True)"
206206
]
207207
},
208208
{
@@ -221,8 +221,8 @@
221221
"outputs": [],
222222
"source": [
223223
"# select data that occurs before a specified date\n",
224-
"train = dataset.time_before(datetime(2012, 9, 1))\n",
225-
"train.to_pandas_dataframe().tail(5)"
224+
"train = dataset.time_before(datetime(2012, 8, 31), include_boundary=True)\n",
225+
"train.to_pandas_dataframe().tail(5).reset_index(drop=True)"
226226
]
227227
},
228228
{
@@ -231,8 +231,8 @@
231231
"metadata": {},
232232
"outputs": [],
233233
"source": [
234-
"test = dataset.time_after(datetime(2012, 8, 31))\n",
235-
"test.to_pandas_dataframe().head(5)"
234+
"test = dataset.time_after(datetime(2012, 9, 1), include_boundary=True)\n",
235+
"test.to_pandas_dataframe().head(5).reset_index(drop=True)"
236236
]
237237
},
238238
{
@@ -247,7 +247,7 @@
247247
"|-|-|\n",
248248
"|**task**|forecasting|\n",
249249
"|**primary_metric**|This is the metric that you want to optimize.<br> Forecasting supports the following primary metrics <br><i>spearman_correlation</i><br><i>normalized_root_mean_squared_error</i><br><i>r2_score</i><br><i>normalized_mean_absolute_error</i>\n",
250-
"|**blacklist_models**|Models in blacklist won't be used by AutoML. All supported models can be found at [here](https://docs.microsoft.com/en-us/python/api/azureml-train-automl/azureml.train.automl.constants.supportedmodels.regression?view=azure-ml-py).|\n",
250+
"|**blacklist_models**|Models in blacklist won't be used by AutoML. All supported models can be found at [here](https://docs.microsoft.com/en-us/python/api/azureml-train-automl-client/azureml.train.automl.constants.supportedmodels.forecasting?view=azure-ml-py).|\n",
251251
"|**experiment_timeout_minutes**|Experimentation timeout in minutes.|\n",
252252
"|**training_data**|Input dataset, containing both features and label column.|\n",
253253
"|**label_column_name**|The name of the label column.|\n",

how-to-use-azureml/automated-machine-learning/forecasting-bike-share/forecasting_script.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,17 @@
3232

3333
grain_column_names = []
3434

35-
df = test_dataset.to_pandas_dataframe()
35+
df = test_dataset.to_pandas_dataframe().reset_index(drop=True)
3636

37-
X_test_df = test_dataset.drop_columns(columns=[target_column_name])
38-
y_test_df = test_dataset.with_timestamp_columns(
39-
None).keep_columns(columns=[target_column_name])
37+
X_test_df = test_dataset.drop_columns(columns=[target_column_name]).to_pandas_dataframe().reset_index(drop=True)
38+
y_test_df = test_dataset.with_timestamp_columns(None).keep_columns(columns=[target_column_name]).to_pandas_dataframe()
4039

4140
fitted_model = joblib.load('model.pkl')
4241

4342
df_all = forecasting_helper.do_rolling_forecast(
4443
fitted_model,
45-
X_test_df.to_pandas_dataframe(),
46-
y_test_df.to_pandas_dataframe().values.T[0],
44+
X_test_df,
45+
y_test_df.values.T[0],
4746
target_column_name,
4847
time_column_name,
4948
max_horizon,

how-to-use-azureml/automated-machine-learning/forecasting-energy-demand/auto-ml-forecasting-energy-demand.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"\n",
3333
"Advanced Forecasting\n",
3434
"1. [Advanced Training](#advanced_training)\n",
35-
"1. [Advanced Results](#advanced Results)"
35+
"1. [Advanced Results](#advanced_results)"
3636
]
3737
},
3838
{
@@ -211,7 +211,7 @@
211211
"outputs": [],
212212
"source": [
213213
"dataset = Dataset.Tabular.from_delimited_files(path = \"https://automlsamplenotebookdata.blob.core.windows.net/automl-sample-notebook-data/nyc_energy.csv\").with_timestamp_columns(fine_grain_timestamp=time_column_name) \n",
214-
"dataset.take(5).to_pandas_dataframe()"
214+
"dataset.take(5).to_pandas_dataframe().reset_index(drop=True)"
215215
]
216216
},
217217
{
@@ -253,7 +253,7 @@
253253
"source": [
254254
"# split into train based on time\n",
255255
"train = dataset.time_before(datetime(2017, 8, 8, 5), include_boundary=True)\n",
256-
"train.to_pandas_dataframe().sort_values(time_column_name).tail(5)"
256+
"train.to_pandas_dataframe().sort_values(time_column_name).tail(5).reset_index(drop=True)"
257257
]
258258
},
259259
{
@@ -263,8 +263,8 @@
263263
"outputs": [],
264264
"source": [
265265
"# split into test based on time\n",
266-
"test = dataset.time_between(datetime(2017, 8, 8, 5), datetime(2017, 8, 10, 5))\n",
267-
"test.to_pandas_dataframe().head(5)"
266+
"test = dataset.time_between(datetime(2017, 8, 8, 6), datetime(2017, 8, 10, 5))\n",
267+
"test.to_pandas_dataframe().head(5).reset_index(drop=True)"
268268
]
269269
},
270270
{
@@ -301,7 +301,7 @@
301301
"|-|-|\n",
302302
"|**task**|forecasting|\n",
303303
"|**primary_metric**|This is the metric that you want to optimize.<br> Forecasting supports the following primary metrics <br><i>spearman_correlation</i><br><i>normalized_root_mean_squared_error</i><br><i>r2_score</i><br><i>normalized_mean_absolute_error</i>|\n",
304-
"|**blacklist_models**|Models in blacklist won't be used by AutoML. All supported models can be found at [here](https://docs.microsoft.com/en-us/python/api/azureml-train-automl/azureml.train.automl.constants.supportedmodels.regression?view=azure-ml-py).|\n",
304+
"|**blacklist_models**|Models in blacklist won't be used by AutoML. All supported models can be found at [here](https://docs.microsoft.com/en-us/python/api/azureml-train-automl-client/azureml.train.automl.constants.supportedmodels.forecasting?view=azure-ml-py).|\n",
305305
"|**experiment_timeout_minutes**|Maximum amount of time in minutes that the experiment take before it terminates.|\n",
306306
"|**training_data**|The training data to be used within the experiment.|\n",
307307
"|**label_column_name**|The name of the label column.|\n",
@@ -454,7 +454,7 @@
454454
"metadata": {},
455455
"outputs": [],
456456
"source": [
457-
"X_test = test.to_pandas_dataframe()\n",
457+
"X_test = test.to_pandas_dataframe().reset_index(drop=True)\n",
458458
"y_test = X_test.pop(target_column_name).values"
459459
]
460460
},
@@ -633,7 +633,7 @@
633633
"cell_type": "markdown",
634634
"metadata": {},
635635
"source": [
636-
"## Advanced Results\n",
636+
"## Advanced Results<a id=\"advanced_results\"></a>\n",
637637
"We did not use lags in the previous model specification. In effect, the prediction was the result of a simple regression on date, grain and any additional features. This is often a very good prediction as common time series patterns like seasonality and trends can be captured in this manner. Such simple regression is horizon-less: it doesn't matter how far into the future we are predicting, because we are not using past data. In the previous example, the horizon was only used to split the data for cross-validation."
638638
]
639639
},

how-to-use-azureml/deployment/deploy-to-cloud/model-register-and-deploy.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@
405405
"\n",
406406
" - To run a production-ready web service, see the [notebook on deployment to Azure Kubernetes Service](../production-deploy-to-aks/production-deploy-to-aks.ipynb).\n",
407407
" - To run a local web service, see the [notebook on deployment to a local Docker container](../deploy-to-local/register-model-deploy-local.ipynb).\n",
408-
" - For more information on datasets, see the [notebook on training with datasets](../../work-with-data/datasets-tutorial/train-with-datasets.ipynb).\n",
408+
" - For more information on datasets, see the [notebook on training with datasets](../../work-with-data/datasets-tutorial/train-with-datasets/train-with-datasets.ipynb).\n",
409409
" - For more information on environments, see the [notebook on using environments](../../training/using-environments/using-environments.ipynb).\n",
410410
" - For information on all the available deployment targets, see [&ldquo;How and where to deploy models&rdquo;](https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-deploy-and-where#choose-a-compute-target)."
411411
]

how-to-use-azureml/track-and-monitor-experiments/logging-api/logging-api.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"\n",
101101
"# Check core SDK version number\n",
102102
"\n",
103-
"print(\"This notebook was created using SDK version 1.0.76.2, you are currently running version\", azureml.core.VERSION)"
103+
"print(\"This notebook was created using SDK version 1.0.79, you are currently running version\", azureml.core.VERSION)"
104104
]
105105
},
106106
{

how-to-use-azureml/work-with-data/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ With Azure Machine Learning datasets, you can:
1010

1111
## Learn how to use Azure Machine Learning datasets
1212
* [Create and register datasets](https://aka.ms/azureml/howto/createdatasets)
13-
* Use [Datasets in training](datasets-tutorial/train-with-datasets.ipynb)
13+
* Use [Datasets in training](datasets-tutorial/train-with-datasets/train-with-datasets.ipynb)
1414
* Use TabularDatasets in [automated machine learning training](https://aka.ms/automl-dataset)
1515
* Use FileDatasets in [image classification](https://aka.ms/filedataset-samplenotebook)
1616
* Use FileDatasets in [deep learning with hyperparameter tuning](https://aka.ms/filedataset-hyperdrive)

0 commit comments

Comments
 (0)