Skip to content

Commit e1ac60f

Browse files
authored
Merge pull request #110623 from sdgilley/sdg-local-remote
Automated ML local vs. remote
2 parents 8133048 + 4dfebca commit e1ac60f

File tree

2 files changed

+99
-5
lines changed

2 files changed

+99
-5
lines changed

articles/machine-learning/concept-automated-ml.md

Lines changed: 96 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,101 @@ Enable this setting with:
130130

131131
+ Python SDK: Specifying `"feauturization": 'auto' / 'off' / 'FeaturizationConfig'` for the [`AutoMLConfig` class](/python/api/azureml-train-automl-client/azureml.train.automl.automlconfig.automlconfig).
132132

133-
<a name="parity"></a>
133+
## Classification & regression
134+
135+
Classification and regression are the most common types of machine learning tasks. Both are types of supervised learning in which models learn using training data, and apply those learnings to new data. Azure Machine Learning offers featurizations specifically for these tasks, such as deep neural network text featurizers for classification. Learn more about [featurization options](how-to-use-automated-ml-for-ml-models.md#featurization).
136+
137+
The main goal of classification models is to predict which categories new data will fall into based on learnings from its training data. Common classification examples include fraud detection, handwriting recognition, and object detection. Learn more and see an example of [classification with automated machine learning](tutorial-train-models-with-aml.md).
138+
139+
Different from classification where predicted output values are categorical, regression models predict numerical output values based on independent predictors. In regression, the objective is to help establish the relationship among those independent predictor variables by estimating how one variable impacts the others. For example, automobile price based on features like, gas mileage, safety rating, etc. Learn more and see an example of [regression with automated machine learning](tutorial-auto-train-models.md).
140+
141+
## Time-series forecasting
142+
143+
Building forecasts is an integral part of any business, whether it's revenue, inventory, sales, or customer demand. You can use automated ML to combine techniques and approaches and get a recommended, high-quality time-series forecast.
144+
145+
An automated time-series experiment is treated as a multivariate regression problem. Past time-series values are "pivoted" to become additional dimensions for the regressor together with other predictors. This approach, unlike classical time series methods, has an advantage of naturally incorporating multiple contextual variables and their relationship to one another during training. Automated ML learns a single, but often internally branched model for all items in the dataset and prediction horizons. More data is thus available to estimate model parameters and generalization to unseen series becomes possible.
146+
147+
Learn more and see an example of [automated machine learning for time series forecasting](how-to-auto-train-forecast.md). Or, see the [energy demand notebook](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/automated-machine-learning/forecasting-energy-demand/auto-ml-forecasting-energy-demand.ipynb) for detailed code examples of advanced forecasting configuration including:
148+
149+
* holiday detection and featurization
150+
* time-series and DNN learners (Auto-ARIMA, Prophet, ForecastTCN)
151+
* many models support through grouping
152+
* rolling-origin cross validation
153+
* configurable lags
154+
* rolling window aggregate features
155+
156+
## <a name="ensemble"></a> Ensemble models
157+
158+
Automated machine learning supports ensemble models, which are enabled by default. Ensemble learning improves machine learning results and predictive performance by combining multiple models as opposed to using single models. The ensemble iterations appear as the final iterations of your run. Automated machine learning uses both voting and stacking ensemble methods for combining models:
159+
160+
* **Voting**: predicts based on the weighted average of predicted class probabilities (for classification tasks) or predicted regression targets (for regression tasks).
161+
* **Stacking**: stacking combines heterogenous models and trains a meta-model based on the output from the individual models. The current default meta-models are LogisticRegression for classification tasks and ElasticNet for regression/forecasting tasks.
162+
163+
The [Caruana ensemble selection algorithm](http://www.niculescu-mizil.org/papers/shotgun.icml04.revised.rev2.pdf) with sorted ensemble initialization is used to decide which models to use within the ensemble. At a high level, this algorithm initializes the ensemble with up to five models with the best individual scores, and verifies that these models are within 5% threshold of the best score to avoid a poor initial ensemble. Then for each ensemble iteration, a new model is added to the existing ensemble and the resulting score is calculated. If a new model improved the existing ensemble score, the ensemble is updated to include the new model.
164+
165+
See the [how-to](how-to-configure-auto-train.md#ensemble) for changing default ensemble settings in automated machine learning.
166+
167+
## Use with ONNX
168+
169+
With Azure Machine Learning, you can use automated ML to build a Python model and have it converted to the ONNX format. Once the models are in the ONNX format, they can be run on a variety of platforms and devices. Learn more about [accelerating ML models with ONNX](concept-onnx.md).
170+
171+
See how to convert to ONNX format [in this Jupyter notebook example](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/automated-machine-learning/classification-bank-marketing-all-features/auto-ml-classification-bank-marketing-all-features.ipynb). Learn which [algorithms are supported in ONNX](how-to-configure-auto-train.md#select-your-experiment-type).
172+
173+
The ONNX runtime also supports C#, so you can use the model built automatically in your C# apps without any need for recoding or any of the network latencies that REST endpoints introduce. Learn more about [inferencing ONNX models with the ONNX runtime C# API](https://github.com/Microsoft/onnxruntime/blob/master/docs/CSharp_API.md).
174+
175+
## <a name="local-remote"></a>Guidance on local vs. remote managed ML compute targets
176+
177+
The web interface for automated ML always uses a remote [compute target](concept-compute-target.md). But when you use the Python SDK, you will choose either a local compute or a remote compute target for automated ML training.
178+
179+
* **Local compute**: Training occurs on your local laptop or VM compute.
180+
* **Remote compute**: Training occurs on Machine Learning compute clusters.
134181

135-
## The studio vs SDK
182+
### Choose compute target
183+
Consider these factors when choosing your compute target:
136184

137-
Learn about the parity and differences between the high-level automated ML capabilities available through the Python SDK and the studio in Azure Machine Learning.
185+
* **Choose a local compute**: If your scenario is about initial explorations or demos using small data and short trains (i.e. seconds or a couple of minutes per child run), training on your local computer might be a better choice. There is no setup time, the infrastructure resources (your PC or VM) are directly available.
186+
* **Chose a remote ML compute cluster**: If you are training with larger datasets like in production training creating models which need longer trains, remote compute will provide much better end-to-end time performance because `AutoML` will parallelize trains across the cluster's nodes. On a remote compute, the start up time for the internal infrastructure will add around 1.5 minutes per child run, plus additional minutes for the cluster infrastructure if the VMs are not yet up and running.
187+
188+
### Pros and cons
189+
Consider these pros and cons when choosing to use local vs. remote.
190+
191+
| | Pros (Advantages) |Cons (Handicaps) |
192+
|---------|---------|---------|---------|
193+
|**Local compute target** | <li> No environment start up time | <li> Subset of features<li> Can't parallelize runs <li> Worse for large data. <li>No data streaming while training <li> No DNN-based featurization <li> Python SDK only |
194+
|**Remote ML compute clusters**| <li> Full set of features <li> Parallelize child runs <li> Large data support<li> DNN-based featurization <li> Dynamic scalability of compute cluster on demand <li> No-code experience (web UI) also available | <li> Start up time for cluster nodes <li> Start up time for each child run |
195+
196+
### Feature availability
197+
198+
More features are available when you use the remote compute, as shown in the table below. Some of these features are available only in an Enterprise workspace.
199+
200+
| Feature | Remote | Local | Requires <br>Enterprise workspace |
201+
|------------------------------------------------------------|--------|-------|-------------------------------|
202+
| Data streaming (Large data support, up to 100 GB) || ||
203+
| DNN-BERT-based text featurization and training || ||
204+
| Out-of-the-box GPU support (training and inference) || ||
205+
| Image Classification and Labeling support || ||
206+
| Auto-ARIMA, Prophet and ForecastTCN models for forecasting || ||
207+
| Multiple runs/iterations in parallel || ||
208+
| Create models with interpretability in AutoML studio web experience UI || ||
209+
| Feature engineering customization in studio web experience UI || ||
210+
| Azure ML hyperparameter tuning || | |
211+
| Azure ML Pipeline workflow support || | |
212+
| Continue a run || | |
213+
| Forecasting ||||
214+
| Create and run experiments in notebooks ||| |
215+
| Register and visualize experiment's info and metrics in UI ||| |
216+
| Data guardrails ||| |
217+
218+
219+
## Automated ML in Azure Machine Learning
220+
221+
Azure Machine Learning offers two experiences for working with automated ML
222+
223+
* For code experienced customers, [Azure Machine Learning Python SDK](https://docs.microsoft.com/python/api/overview/azure/ml/intro?view=azure-ml-py)
224+
225+
* For limited/no code experience customers, Azure Machine Learning studio at [https://ml.azure.com](https://ml.azure.com/)
226+
227+
<a name="parity"></a>
138228

139229
### Experiment settings
140230

@@ -208,7 +298,9 @@ The ONNX runtime also supports C#, so you can use the model built automatically
208298

209299
See examples and learn how to build models using automated machine learning:
210300

211-
+ Follow the [Tutorial: Automatically train a regression model with Azure Machine Learning](tutorial-auto-train-models.md)
301+
+ Follow the [Tutorial: Automatically train a regression model with Azure Machine Learning](tutorial-auto-train-models.md)
302+
303+
+ Learn how to use a [remote compute target](how-to-auto-train-remote.md)
212304

213305
+ Configure the settings for automatic training experiment:
214306
+ In Azure Machine Learning studio, [use these steps](how-to-use-automated-ml-for-ml-models.md).

articles/machine-learning/how-to-auto-train-remote.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ In this article, you learn how to build a model using automated ML with AmlCompu
2626

2727
## How does remote differ from local?
2828

29-
The tutorial "[Train a classification model with automated machine learning](tutorial-auto-train-models.md)" teaches you how to use a local computer to train a model with automated ML. The workflow when training locally also applies to remote targets as well. However, with remote compute, automated ML experiment iterations are executed asynchronously. This functionality allows you to cancel a particular iteration, watch the status of the execution, or continue to work on other cells in the Jupyter notebook. To train remotely, you first create a remote compute target such as AmlCompute. Then you configure the remote resource and submit your code there.
29+
More features are available when you use a remote compute target. For more details, see [Local and remote compute targets](concept-automated-ml.md#local-remote).
30+
31+
The tutorial "[Train a classification model with automated machine learning](tutorial-auto-train-models.md)" teaches you how to use a local computer to train a model with automated ML. The workflow when training locally also applies to remote targets as well. To train remotely, you first create a remote compute target such as AmlCompute. Then you configure the remote resource and submit your code there.
3032

3133
This article shows the extra steps needed to run an automated ML experiment on a remote AmlCompute target. The workspace object, `ws`, from the tutorial is used throughout the code here.
3234

0 commit comments

Comments
 (0)