A hyperparameter sweep systematically varies training-time settings — learning rate, batch size, regularisation, depth — to find the configuration that best fits your data within the constraints you actually have to live with. That last clause is where most sweeps go wrong. Run as an open-ended search for the highest validation score, a sweep will happily consume hundreds of trials and produce a compute bill with no verdict attached. Run as a bounded test of the one assumption your proof-of-concept exists to check, it produces a signable answer: yes, a configuration exists that clears the business threshold inside the latency and cost envelope — or no, none does, and here is the evidence. That difference is the whole subject of this article. The mechanics of a sweep are not complicated. Scoping one so it terminates in a decision rather than a plateau is the part teams get wrong, and it is the part that determines whether pilot compute turns into an artefact or into sunk cost. How does a hyperparameter sweep work in practice? A model has two kinds of knobs. Parameters are the weights the training process learns from data — a transformer’s attention matrices, a gradient-boosted tree’s split thresholds. You do not set these by hand; the optimiser finds them. Hyperparameters are the settings that govern how training happens: the learning rate, the batch size, the number of layers, the dropout rate, the weight-decay coefficient, the choice of optimiser. Training does not learn these. You choose them before the run starts, and different choices produce different learned parameters and different final accuracy. A sweep is the process of trying a set of hyperparameter combinations, training a model under each, and comparing the results on a held-out validation set. In practice you define a search space (learning rate between, say, 1e-5 and 1e-2; batch size in {16, 32, 64}; two or three depths), pick a strategy for choosing which points in that space to try, launch the trials, and read the validation metric off each one. Tools like Weights & Biases Sweeps, Optuna, and Ray Tune orchestrate this — they hand out configurations to workers, collect results, and in the smarter cases decide which region of the space to explore next. If you want the mechanics of one such orchestrator, our note on how W&B Sweeps work and when they matter walks through the agent-and-config model. That is the machinery. The reason the scope matters more than the machinery is that the machinery never tells you to stop. There is almost always another fractional point of accuracy to be had from a finer grid or a few more trials, and chasing it reads like progress while producing no decision. Why does the sweep only touch hyperparameters, not the learned parameters? Because the learned parameters are downstream of the hyperparameters. You cannot independently set a weight matrix and expect it to mean anything — its values only make sense as the output of a training run under a specific configuration. The hyperparameters are the levers you actually control; the parameters are what those levers produce. Sweeping over weights directly would be sweeping over the answer, not the question. This distinction has a practical consequence for a POC. Every trial in a sweep is a full or partial training run, which means every trial costs compute proportional to your dataset and model size. A sweep of 200 trials on a model that takes an hour to train is 200 GPU-hours before you have looked at a single number, and that arithmetic is exactly why an unbounded sweep is dangerous in a time-boxed pilot. The cost is not the search — it is the training you pay for at every point in the search. Which sweep strategies fit a time-boxed POC? Three strategies dominate, and they differ in how they spend a fixed trial budget. The right choice depends on how many hyperparameters you are varying and how expensive each trial is. Strategy How it picks points Best when POC caution Grid search Every combination of discrete values ≤2–3 hyperparameters, each with few levels Trial count explodes combinatorially — 4 params × 4 levels = 256 runs Random search Samples the space at random Moderate dimensionality; some params matter far more than others Cheap and surprisingly strong; no learning between trials Bayesian optimisation Models the metric surface, samples where improvement is likely Expensive trials, a fixed budget, and a smooth-ish metric Overhead only pays off past ~15–20 trials; sensitive to noisy validation The practitioner heuristic worth internalising: for a POC with a hard trial ceiling, random search is the honest default and Bayesian optimisation is the upgrade you earn once trials are expensive enough to justify the modelling overhead (observed pattern across the pilots we run; not a benchmarked ranking). Grid search survives only when you are genuinely varying two knobs. The reason random search beats grid so often is that in most models a small number of hyperparameters dominate the metric, and random sampling spends its budget across more distinct values of those dominant knobs instead of wasting it on fine variations of ones that do not matter — a result established in the machine-learning literature and confirmed repeatedly in practice. How do you bound a sweep so it produces a go/no-go signal? A scoped sweep needs two things an unbounded one lacks: a search space anchored to the assumption you are testing, and a stopping rule that terminates the search on a decision rather than on a plateau. Get both from the same source — the highest-risk assumption your POC exists to resolve. Most pilots carry one dominant technical risk, and it usually reads: can the target accuracy be reached at all within the production latency and cost budget? A risk assessment done at the start of the engagement should name that assumption explicitly. The sweep’s job is then narrow: search only the region of hyperparameter space that could plausibly satisfy it, and stop the moment you have either found a qualifying configuration or run out of budget with none in sight. Here is a worked example with the assumptions stated. Suppose the POC target is 92% F1 on a defect-classification task, the production budget is 40 ms per inference on a single T4-class GPU, and the pilot has a 60-trial compute ceiling. Search space: learning rate 1e-4 to 1e-2 (log scale), batch size {32, 64}, backbone depth {ResNet-18, ResNet-34} — two backbones because the deeper one may cross 92% F1 but risks breaking the 40 ms latency budget, and that tension is the assumption under test. Objective: maximise validation F1 subject to measured p95 inference latency ≤ 40 ms. Trials that exceed latency are recorded, not discarded — a fast configuration that misses accuracy and a slow one that clears it are both evidence. Stopping rule: stop early if any trial reaches ≥92% F1 within budget (you have your go signal), or after 60 trials regardless. If the 60-trial budget exhausts with the best in-latency trial at 88% F1, that is a clean no-go on this architecture family — not a failure to search harder. The stopping rule is what converts tuning into a verdict. Without it, the 88% result reads as “we need more trials”; with it, the 88% result reads as “no reachable configuration in this family clears the bar, and here is the space we searched to establish that.” Should latency and cost shape the sweep, or get checked afterwards? Afterwards is where good sweeps quietly fail. The common pattern is to sweep for accuracy, pick the best-scoring configuration, and then measure its inference latency — only to discover the winning model is too slow or too expensive to serve. Now the sweep has to be re-run, or worse, the team ships the second-best configuration without knowing whether a better-in-budget one existed. Production constraints belong inside the objective, not outside it. A sweep whose objective is “maximise F1 subject to p95 latency ≤ 40 ms and cost per 1k inferences ≤ X” searches the feasible region directly. Configurations that violate the constraint are logged as evidence of the boundary rather than treated as candidates. This is not a refinement — it changes which region of the space the search prioritises, because a Bayesian optimiser told about the latency constraint will stop wasting trials on deep, slow architectures that could never serve inside the budget. There is a caveat worth naming: latency measured during a sweep, on sweep-time batch sizes and an un-optimised runtime, is not the latency you will see in production. A model exported to TensorRT or compiled with torch.compile, served at production batch size, behaves differently. Treat the in-sweep latency as a directional filter — it correctly rejects the obviously-too-slow, but the go/no-go signal still needs a production-representative latency check on the winning configuration. That check is part of the prototype-to-production hardening covered in our work on taking a generative AI prototype to production, where the configuration a sweep chose has to hold up under real serving load. What sweep artefacts should survive the POC? The value of a scoped sweep does not end when the pilot does — if you record the right things, the sweep becomes reusable evidence. Three artefacts matter, and they should outlive the compute that produced them. The search space. The exact ranges and discrete values you searched. This is what lets a later reader know what was not tried, which is as important as what was. A no-go verdict means nothing without the boundary of the search that produced it. The best trial, fully specified. Not just its metric — its complete hyperparameter configuration, the validation and in-sweep latency numbers, and the data split it was measured on. This is the configuration a production hardening phase inherits. Compute per point of improvement. How much tuning compute bought each fractional gain in the metric. This is the number that tells you whether further tuning is worth it, and it is the single most useful figure for scoping the next sweep on a related task. Logging these systematically — rather than reconstructing them from scattered run logs after the fact — is exactly what a structured experiment table is for. Our note on logging POC evidence you can sign off on with W&B Tables covers the mechanics of capturing this in a form a stakeholder can review. The point is that a sweep run this way produces a document, not just a checkpoint file: usable whether the project proceeds to production or stops with a clean, defensible negative result. FAQ What’s worth understanding about hyperparameter sweep first? A sweep trains a model repeatedly under different hyperparameter combinations — learning rate, batch size, depth, regularisation — and compares them on a held-out validation set. You define a search space, pick a strategy for choosing which points to try, run the trials, and read the metric off each. In practice, orchestrators like Weights & Biases Sweeps, Optuna, or Ray Tune hand out configurations and collect results; the discipline is deciding when to stop. What is the difference between a hyperparameter and a model parameter, and why does the sweep only touch the former? Model parameters are the weights the optimiser learns from data during training; you do not set them by hand. Hyperparameters are the settings that govern how training happens, chosen before the run starts. A sweep only touches hyperparameters because the learned parameters are downstream of them — they only make sense as the output of a training run under a given configuration, so there is nothing coherent to sweep over directly. Which sweep strategies (grid, random, Bayesian) fit a time-boxed POC, and how do you choose between them? Grid search only survives when you are varying two or three knobs, because trial count explodes combinatorially. Random search is the honest default for a fixed trial budget and is surprisingly strong, since a few hyperparameters usually dominate the metric. Bayesian optimisation is the upgrade you earn once trials are expensive enough — roughly past 15–20 — to justify the modelling overhead. How do you bound a sweep with a search space and a stopping rule so it produces a go/no-go signal instead of running indefinitely? Anchor both to the highest-risk assumption the POC exists to resolve — usually “can the target metric be reached within the latency and cost budget.” Search only the region of the space that could plausibly satisfy it, and stop the moment you find a qualifying configuration or exhaust your trial budget. A budget-exhausted search with no qualifying trial is a clean no-go, not a failure to search harder. How should production constraints like latency and cost budget shape the sweep rather than being checked afterwards? Put them inside the objective: maximise the metric subject to a latency and cost ceiling, rather than sweeping for accuracy and checking serving cost afterwards. This changes which region the search prioritises, because the optimiser stops wasting trials on configurations that could never serve in budget. Note that in-sweep latency is only a directional filter — the winning configuration still needs a production-representative latency check. What sweep artefacts (search space, best trial, compute per point of improvement) should survive the POC as reusable evidence? Record the exact search space, so a later reader knows what was not tried; the fully specified best trial, so a hardening phase can inherit its configuration; and the compute spent per point of metric improvement, which tells you whether further tuning is worth it. Logged systematically in a structured table, these turn a sweep into a signable document rather than a scattered set of run logs — useful whether the project proceeds or stops. A sweep is not a search for the best possible model. It is a bounded test of one assumption, run until it answers yes or no. When you find yourself justifying another round of trials with “the metric was still creeping up,” the honest question is not whether more accuracy is reachable — it almost always is — but whether the go/no-go signal your POC needed was already sitting in the results you have.