3.1 Training Models with Agent Platform AutoML
Key Takeaways
- Agent Platform AutoML supports image classification, image object detection, tabular classification and regression, and tabular forecasting.
- AutoML tabular datasets need 1,000 to 100,000,000 rows, 2 to 1,000 columns, and no more than 100 GB of data.
- By default, AutoML tabular training randomly assigns 80% of rows to training, 10% to validation, and 10% to test.
- AUC ROC is the default optimization objective for binary classification, log loss is the only objective for multi-class classification, and RMSE is the default for regression.
- Google recommends about 1,000 training images per label for AutoML image classification, with a minimum of 10.
AutoML on Agent Platform trains models without model code. You prepare labeled data, create a managed dataset, pick an objective, set a training budget, and AutoML handles preprocessing, architecture search, hyperparameter tuning, and ensembling. The exam tests whether AutoML fits the scenario and which settings matter.
What AutoML Supports Today
| Data type | Objectives |
|---|---|
| Image | Classification (single-label or multi-label), object detection |
| Tabular | Classification and regression, forecasting |
AutoML Text and AutoML Video are retired. For text classification, entity extraction, sentiment, or video understanding, the current low-code answer is a Gemini model with prompting, plus supervised tuning if needed (Chapter 4).
The AutoML Workflow
- Prepare training data that looks like production data.
- Create a managed dataset from BigQuery or CSV (tabular) or from image files in Cloud Storage with an import file (JSON Lines or CSV).
- Train by choosing the objective, target column or labels, data split, optimization objective, and budget.
- Evaluate the metrics AutoML produces on the test split.
- Get inferences online (deploy to an endpoint) or in batch (no endpoint needed).
- Interpret results, for example with feature importance for tabular models.
Tabular Data Requirements
| Requirement | Classification and regression |
|---|---|
| Size | 100 GB or smaller |
| Columns | At least 2 and at most 1,000 (target plus at least one feature) |
| Rows | At least 1,000 and at most 100,000,000 |
| Target | Required. No null values. Categorical or numerical |
| Sources | BigQuery table or view (bq://project.dataset.table), or CSV files (each ≤10 GB, ≤100 GB total) |
| Row weights | Optional numeric weight column, 0-10,000 |
If the BigQuery table or Cloud Storage bucket is in a different project, grant the Agent Platform Service Agent access to it.
Data splits
By default, AutoML randomly assigns 80% / 10% / 10% of rows to training, validation, and test. The split is deterministic, so retraining on the same data gives the same split. Change the default when:
- Data is time-sensitive (and you aren't forecasting): use a chronological split on a time column so the test set holds the most recent rows.
- Production will score unseen groups (such as new stores): use a manual split column with
TRAIN,VALIDATE, andTESTvalues so no group appears in more than one split. - Classes are imbalanced: AutoML doesn't stratify, so make sure the test split has enough minority examples.
AutoML uses the validation split to steer trials. It then reports final metrics from a model trained on training + validation and scored on test. The model you serve is trained on all three splits so it uses as much data as possible.
Optimization objectives
| Model type | Objective (API value) | Choose it when |
|---|---|---|
| Binary classification | AUC ROC (maximize-au-roc), default | You need good separation between classes |
| Binary classification | AUC PR (maximize-au-prc) | The positive class is rare and matters most |
| Binary classification | Precision at recall / Recall at precision | The business fixes one metric (for example, "at least 90% recall") |
| Classification (any) | Log loss (minimize-log-loss) | You need well-calibrated probabilities. It is the only objective for multi-class |
| Regression | RMSE (minimize-rmse), default | Large errors should be penalized heavily |
| Regression | MAE (minimize-mae) | Outliers should have less influence |
| Regression | RMSLE (minimize-rmsle) | Relative error matters and values span a wide range |
The training budget is set in milli node hours (1,000 milli node hours = 1 node hour). Early stopping ends training once more trials stop helping.
Forecasting with AutoML
AutoML forecasting uses neural network training methods: TiDE (Time series Dense Encoder), Temporal Fusion Transformer (TFT), AutoML (L2L), and Seq2Seq+. Key settings:
- Time column and time series identifier column (for example,
sku_id). - Data granularity (for example, daily), plus optional holiday regions for holiday effects (daily granularity).
- Forecast horizon: how far ahead to predict. Context window: how far back the model looks. Both are counted in units of granularity.
- Covariates: columns available at forecast time (planned promotions, holidays, price) versus unavailable at forecast time (actual weather, competitor sales).
- Hierarchical forecasting to keep forecasts consistent across groups (for example, SKU, store, and region totals).
For a fast statistical baseline, BigQuery ML ARIMA_PLUS trains much faster than neural forecasting. Tabular Workflow for Forecasting exposes every pipeline step when you need more control (Chapter 9).
Image Data Requirements
- Training formats: JPEG, GIF, PNG, BMP, ICO, up to 30 MB per image. Prediction formats: JPEG, GIF, PNG, WEBP, BMP, TIFF, ICO, up to 1.5 MB, sent base64-encoded.
- Classification: Google recommends about 1,000 images per label, with a minimum of 10. Keep the most common label at most 100× more frequent than the least common, and consider a
None_of_the_abovelabel. - Object detection: at least 10 annotated images per label, with bounding boxes at least 0.01 × the image side length. Google recommends about 1,000 annotations per label.
- Grant the Agent Platform Service Agent Storage Object Viewer on the source bucket.
- Make training images match production conditions. Blurry security-camera frames call for blurry training images.
Cloud vs. edge image models
Cloud models are served on Agent Platform endpoints. Edge models run on devices and come in variants tuned for low latency (MOBILE_TF_LOW_LATENCY_1), general purpose (MOBILE_TF_VERSATILE_1), and higher accuracy (MOBILE_TF_HIGH_ACCURACY_1). You can export edge models as TF Lite, Edge TPU TF Lite, a container (TF SavedModel), Core ML (iOS/macOS), or TensorFlow.js. Choose edge when the device has intermittent connectivity or needs on-device latency.
AutoML vs. BigQuery ML vs. Custom Training
| Situation | Best fit |
|---|---|
| Tabular data in BigQuery, SQL team, standard model, batch scoring | BigQuery ML |
| Tabular or image data, little ML expertise, want strong accuracy with no model code | Agent Platform AutoML |
| Custom architecture, custom loss, specific framework, or unsupported objective | Custom training (Chapter 9) |
| Text or video understanding | Gemini prompting and tuning, not AutoML |
A bank trains an AutoML binary classifier to flag fraudulent transactions, which make up 0.3% of rows. The team cares most about performance on the rare fraud class. Which optimization objective fits best?
A retailer trains an AutoML tabular model to predict next-quarter spend for customers. Production scoring will happen next quarter, and customer behavior shifts over time. How should they configure the data split?
A support team wants to classify incoming emails into 12 categories and asks for Agent Platform AutoML Text. What is the current recommended low-code approach?