Chapter 4 of 6
4
Fit without spending the holdout
Freeze test ids before any preprocessor is fit. Tune inside train. Read validation once after the inner bar clears. A reproducible training run is not yet a promotable release.
Operating rule
My operating rule: write the test hash before any fit, clear the bar on an inner slice before validation is read, and never open a tuning loop on the same holdout that already failed.
Checked 29 Oct 2026ML pipeline field card
Freeze the split
Start from Prepare’s matured rows (window closed and outcome available) and label_delay_days in quality.json. Sort by decision time. Last tenth → test; previous tenth → validation; rest → train. Apply the same embargo of label_delay_days at train|validation and at validation|test; gap rows enter neither adjacent set. Keep entity keys disjoint across partitions. Persist ids and hash test ids into split_ids.parquet before any preprocessor is fit.
Time order is the default when the decision has a clock. Without decision time, use a stratified random split with a fixed seed — the weaker case — and still require matured rows and disjoint entities. scikit-learn’s held-out practice applies; selecting again on the same frozen ids spends the holdout.14
Train inside the freeze
Fit every preprocessor on train only — imputation, missing indicators, rare-level map, cap bounds, scaler, target-encoding map — then apply without refitting. Save preprocess.joblib with the model.
Inner slice = last tenth of train. Score the baseline there. On this illustration the baseline is oldest past-due first. Metric is named in task.json (average precision when positives are rare, else ROC-AUC; Brier when the served value is a probability). Ranking quality under the historical contact policy is the gate — not a causal estimate of placing a call.
Train a regularized linear model and a tree model. Prune and tune on the inner slice only. Validation stays unread while candidates are selected. After Loops A and B finish on the inner slice, score validation once for the single remaining candidate; choose any hard threshold on that same read and freeze it for Ship. Write model.joblib and val_metrics.json with val_reads = 1.
When train misses the bar
The bar is min_metric and beating the baseline. Raw accuracy against a skewed paid base rate is not the bar. Loop budgets and the 0.005 improvement line are this recipe’s operating rule — finite returns, not a published standard.
Loop A and Loop B stay on the inner slice. Loop A: retune, max twenty trials; stop early after five trials that fail to improve by 0.005. Loop B: one feature_spec change per pass from inner errors, max three; then Loop A with ten trials — still no validation score between revisions. Only after A and B finish does the one official validation read run for the single inner-cleared candidate. A fail on that read sets model_card status blocked; it does not reopen A/B on the same validation ids — that would be an informal repeated selection loop.
Loop C: named data defect only (not a weak score alone); new split; discard old test ids unread; val_reads resets. One Fit run on the new freeze. Still short → blocked. Do not read test. Do not serve.
Clearing validation once makes a reproducible candidate. It does not promote a release. Ship still owns the one test read, the bundle, and the previous version.
When a draft is cheap
A generated AutoML run can report a strong score after peeking at later mornings. Fit without spending the holdout still applies. The freeze is the check, not the leaderboard.