Debug and tune a training job
Distinguish ingestion, resource failures and model-quality problems before spending a tuning budget.
Debug and tune a training job
Work through the decision
A managed training run fails after the first large group of videos is decoded. A separate completed run overfits. Would hyperparameter tuning solve both problems?
Check your reasoning
Inspect job and worker logs and resource metrics around the failure. Check object availability, decoding, batch size and memory on the failing worker. Use versioned Cloud Storage manifests or BigQuery snapshots with a known split. For the completed run, compare training and validation curves before choosing regularization or tuning.
Compare the choices
- Versioned ingestion manifest
- Record exact source objects or snapshots, checksums or generations, schemas and split assignment. Validate the manifest before training.
- Custom training container
- Package runtime dependencies and the training entry point, then configure the job to save model artifacts to durable storage.
- Failure diagnosis from logs
- Find the first failing worker and correlate its error with resource use, permissions and input records. Reproduce on a small shard.
- Hyperparameter search
- Define the validation objective, ranges and trial budget. Compare completed trials on the same split and reserve a final holdout.
- Supervised foundation-model tuning
- Use representative curated input/output pairs for stable task behavior where prompting falls short. Evaluate on unseen cases and monitor regression.
Test the decision
Use managed AutoML or Tabular Workflows for supported structured problems. Use a custom container for a specialized training environment, or Kubeflow on GKE when team-operated infrastructure is required. Test supervised foundation-model tuning on consistent examples after establishing a prompt baseline. Keep final evaluation data out of tuning.
Practice the guide skills
- Store versioned tables, text, speech, image and video assets with a stable manifest. Verify the split keeps repeated observations of one entity together when needed. Watch 1:07:41
- Plan ingestion from an external order database and a media object store. Check retries, keys, freshness and the reconciliation count before training. Watch 1:08:15
- Compare a custom SDK job or container, managed AutoML or Tabular Workflows and Kubeflow on GKE. Choose based on training code, infrastructure ownership and integration needs. Watch 1:09:34 · Continue at 1:11:09
- Trace the earliest worker error in a failed training run. Distinguish a missing object, denied read and out-of-memory process using logs and measurements. Watch 1:13:26
- Define an objective, parameter ranges, trial budget, validation split and stopping rule. Keep the final test set separate from trial selection. Watch 1:14:10
- Test a prompt baseline before supervised tuning. Identify the paired examples, held-out behaviors and regression checks needed to justify a tuned foundation model. Watch 1:15:30
Official objectives for this lesson
Related lesson · Start pipeline design with the consumer’s deadline
Debug and tune a training job quiz
Answer 3 questions. Check each answer for an explanation.