FREE STUDY NOTES · AI-300

Hyperparameter tuning with sweep jobs

Search spaces, sampling methods and early termination policies.

From Ultra Transcenders AI-300 by Tony Rough

When you choose the algorithm yourself, a sweep job tunes its hyperparameters by running the same training many times over a search space. The choices that matter are the sampling method, the early termination policy and the limits that bound cost.

Search space and sampling

Sampling Supports Use when
Random (optionally rule="sobol" with a seed) Discrete and continuous; early termination Starting out or finding promising regions
Grid choice only; early termination You can afford every combination
Bayesian choice, uniform, quniform Enough budget: total trials of at least 20 × the number of hyperparameters. Lower concurrency converges better because each trial learns from completed ones

Common trap: Using grid sampling over a continuous range such as Uniform(0.01, 0.1) - grid sampling takes choice values only; use random or Bayesian sampling for continuous distributions.

Common trap: Adding an early termination policy to a Bayesian sweep - Bayesian sampling doesn’t support early termination, so leave the policy out (no termination); random and grid sampling support it.

Early termination

evaluation_interval counts metric reports (each time the script logs the primary metric is one interval), and delay_evaluation delays the first policy evaluation: the policy then applies at every multiple of evaluation_interval that is greater than or equal to delay_evaluation. With evaluation_interval=1 and delay_evaluation=5, the first evaluation happens at interval 5.

Policy Ends a trial when
Bandit Its metric is outside slack_factor (ratio) or slack_amount (absolute) of the best trial. With best 0.8 and slack_factor=0.2, trials under 0.8/1.2 ≈ 0.67 stop
Median stopping Its best metric is worse than the median of the running averages of all trials
Truncation selection It’s in the lowest truncation_percentage (1–99) at that interval
None (default) Never; all trials run to completion

Median stopping with evaluation_interval=1 and delay_evaluation=5 is the conservative choice (about 25–35% savings with no loss in the primary metric). Bandit with small slack or truncation with a high percentage saves more aggressively.

Limits and results

Get the whole book

This note is one section of Ultra Transcenders AI-300: Operationalizing Machine Learning and Generative AI Solutions, an independent study guide that explains every topic the exam covers by technology, with comparison tables, diagrams and the common traps, plus a glossary linked to Microsoft Learn.

Amazon.co.ukKindlePaperback
Amazon.comKindlePaperback

Free to read with Kindle Unlimited. Opens Amazon in a new tab.

About the book · AI-300 terms in the glossary · All AI-300 study notes

More AI-300 study notes