Skip to content

Commit b0aa91a

Browse files
committed
update samples from Release-140 as a part of SDK release
1 parent 5928ba8 commit b0aa91a

File tree

19 files changed

+30
-1
lines changed

19 files changed

+30
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"output[\"Resource Group\"] = ws.resource_group\n",
9191
"output[\"Location\"] = ws.location\n",
9292
"output[\"Experiment Name\"] = experiment.name\n",
93+
"output[\"SDK Version\"] = azureml.core.VERSION\n",
9394
"pd.set_option(\"display.max_colwidth\", None)\n",
9495
"outputDf = pd.DataFrame(data=output, index=[\"\"])\n",
9596
"outputDf.T"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
"output[\"Resource Group\"] = ws.resource_group\n",
102102
"output[\"Location\"] = ws.location\n",
103103
"output[\"Experiment Name\"] = experiment.name\n",
104+
"output[\"SDK Version\"] = azureml.core.VERSION\n",
104105
"pd.set_option(\"display.max_colwidth\", None)\n",
105106
"outputDf = pd.DataFrame(data=output, index=[\"\"])\n",
106107
"outputDf.T"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"output[\"Resource Group\"] = ws.resource_group\n",
103103
"output[\"Location\"] = ws.location\n",
104104
"output[\"Run History Name\"] = experiment_name\n",
105+
"output[\"SDK Version\"] = azureml.core.VERSION\n",
105106
"pd.set_option(\"display.max_colwidth\", None)\n",
106107
"outputDf = pd.DataFrame(data=output, index=[\"\"])\n",
107108
"outputDf.T"

how-to-use-azureml/automated-machine-learning/forecasting-backtest-many-models/assets/score.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import os
66
import re
77

8+
import numpy as np
89
import pandas as pd
910

1011
from matplotlib import pyplot as plt
@@ -146,6 +147,9 @@ def calculate_scores_and_build_plots(
146147
_draw_one_plot(one_forecast, time_column_name, grains, pdf)
147148
pdf.close()
148149
forecast_df.to_csv(os.path.join(output_dir, FORECASTS_FILE), index=False)
150+
# Remove np.NaN and np.inf from the prediction and actuals data.
151+
forecast_df.replace([np.inf, -np.inf], np.nan, inplace=True)
152+
forecast_df.dropna(subset=[ACTUALS, PREDICTIONS], inplace=True)
149153
metrics = compute_all_metrics(forecast_df, grains + [BACKTEST_ITER])
150154
metrics.to_csv(os.path.join(output_dir, SCORES_FILE), index=False)
151155

how-to-use-azureml/automated-machine-learning/forecasting-backtest-many-models/auto-ml-forecasting-backtest-many-models.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"output[\"Resource Group\"] = ws.resource_group\n",
8787
"output[\"Location\"] = ws.location\n",
8888
"output[\"Default datastore name\"] = dstore.name\n",
89+
"output[\"SDK Version\"] = azureml.core.VERSION\n",
8990
"pd.set_option(\"display.max_colwidth\", None)\n",
9091
"outputDf = pd.DataFrame(data=output, index=[\"\"])\n",
9192
"outputDf.T"

how-to-use-azureml/automated-machine-learning/forecasting-backtest-single-model/assets/score.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import os
66
import re
77

8+
import numpy as np
89
import pandas as pd
910

1011
from matplotlib import pyplot as plt
@@ -146,6 +147,9 @@ def calculate_scores_and_build_plots(
146147
_draw_one_plot(one_forecast, time_column_name, grains, pdf)
147148
pdf.close()
148149
forecast_df.to_csv(os.path.join(output_dir, FORECASTS_FILE), index=False)
150+
# Remove np.NaN and np.inf from the prediction and actuals data.
151+
forecast_df.replace([np.inf, -np.inf], np.nan, inplace=True)
152+
forecast_df.dropna(subset=[ACTUALS, PREDICTIONS], inplace=True)
149153
metrics = compute_all_metrics(forecast_df, grains + [BACKTEST_ITER])
150154
metrics.to_csv(os.path.join(output_dir, SCORES_FILE), index=False)
151155

how-to-use-azureml/automated-machine-learning/forecasting-backtest-single-model/auto-ml-forecasting-backtest-single-model.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
"output[\"SKU\"] = ws.sku\n",
101101
"output[\"Resource Group\"] = ws.resource_group\n",
102102
"output[\"Location\"] = ws.location\n",
103+
"output[\"SDK Version\"] = azureml.core.VERSION\n",
103104
"pd.set_option(\"display.max_colwidth\", None)\n",
104105
"outputDf = pd.DataFrame(data=output, index=[\"\"])\n",
105106
"outputDf.T"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
"output[\"Resource Group\"] = ws.resource_group\n",
120120
"output[\"Location\"] = ws.location\n",
121121
"output[\"Run History Name\"] = experiment_name\n",
122+
"output[\"SDK Version\"] = azureml.core.VERSION\n",
122123
"pd.set_option(\"display.max_colwidth\", None)\n",
123124
"outputDf = pd.DataFrame(data=output, index=[\"\"])\n",
124125
"outputDf.T"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
"output[\"Resource Group\"] = ws.resource_group\n",
133133
"output[\"Location\"] = ws.location\n",
134134
"output[\"Run History Name\"] = experiment_name\n",
135+
"output[\"SDK Version\"] = azureml.core.VERSION\n",
135136
"pd.set_option(\"display.max_colwidth\", None)\n",
136137
"outputDf = pd.DataFrame(data=output, index=[\"\"])\n",
137138
"outputDf.T"

how-to-use-azureml/automated-machine-learning/forecasting-forecast-function/auto-ml-forecasting-function.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
"output[\"Resource Group\"] = ws.resource_group\n",
122122
"output[\"Location\"] = ws.location\n",
123123
"output[\"Run History Name\"] = experiment_name\n",
124+
"output[\"SDK Version\"] = azureml.core.VERSION\n",
124125
"pd.set_option(\"display.max_colwidth\", None)\n",
125126
"outputDf = pd.DataFrame(data=output, index=[\"\"])\n",
126127
"outputDf.T"

0 commit comments

Comments
 (0)