Which mode should I choose?
Start with Explain for a first run. Use Perform for more tuning, or Compete when you can spend more time searching for a strong model.
| Mode | A useful choice when… | What changes |
|---|---|---|
| Explain | You want a quick first model and detailed explanations | A small search, a training/validation split, and explanation plots |
| Perform | You want to tune models and compare them with cross-validation | More configurations and ordinary cross-validation |
| Compete | You want a broader search with a larger compute budget | More tuning, optional neural/TFM candidates, and nested validation on smaller datasets |
A larger search does not guarantee a better test score. Keep a separate test set to evaluate the model you choose.
from supervised import AutoML
automl = AutoML(mode="Perform", total_time_limit=600, n_jobs=2)
automl.fit(X_train, y_train)
Here X_train is your input table and y_train is the target column.
For a complete runnable example, start with Getting started.
Set a training budget
total_time_limit is the training budget in seconds: 600 gives AutoML ten
minutes. Short budgets may leave some candidates unfinished or untried. Data
loading, explanations and report generation can add to elapsed time; individual
operations can also overrun their allowance.
n_jobs limits CPU parallelism. Optional GPU models need compatible packages
and hardware; see installation. To restrict a run to particular
models, pass algorithms, such as ["Linear", "LightGBM"].
Automatic validation in Compete
Validation checks predictions on rows left out of each model's fit. With
mode="Compete" and validation_strategy="auto", the training row count
(after removing missing targets) determines the split:
| Training rows | Validation |
|---|---|
| Fewer than 20,000 | 8 outer folds, evaluating 1 of 8 possible inner splits per outer fold |
| 20,000 or more | Ordinary 8-fold cross-validation |
For nested validation, inner scores compare model settings. After checking settings, each model is refitted on its full outer training partition and predicts the outer rows left out of that fit. Mean outer-fold scores compare models in the report and guide ensemble selection.
Both policies use one repeat and shuffled splits. Classification preserves class proportions. Fold counts shrink when the data or class counts require it, not because the time budget is short. Explicit validation settings and saved runs retain their own policies.
Split settings and predictions on new data
Split and inner-sampling seeds are 1906. Within each outer fold, candidates use the same sampled inner split. Neural epoch and boosting-round selection use only that inner validation. The validation audit records inner and outer scores, row identities, and refit settings.
For example, five minority-class rows allow five outer folds. Each outer training set then contains four minority-class rows, so there are four possible inner folds, with one evaluated. Fewer than two feasible inner folds raises an error.
Nested classic and neural models average their outer-refitted learners for predictions on new data. Kumo and TabICLv2 instead use a saved context with all training rows. Their validation predictions still use held-out rows. Stacking is disabled for automatic nested validation.
Validation in other modes
Without fairness, Explain uses a 75%/25% training/validation split within the
rows supplied to fit(). Your separate test set is not part of this split.
Perform normally uses five-fold CV, switching to up to eight folds when there
are fewer than 5,000 training rows or fewer than 250 rows in the smallest class.
Available class counts can reduce the fold count.
When sensitive_features are passed to fit() with automatic validation,
all modes use ordinary eight-fold CV, capped by row/class counts. Nested
fairness is not supported. Evaluate final fairness metrics on a separate test
set as well as checking the validation report.
For grouped or time-ordered data, provide suitable validation splits instead of relying on shuffled rows.
Ensembles and feature engineering
AutoML builds ensembles by default. A new member must improve validation error by 1%, at every dataset size. Existing members can be reweighted without that threshold. How ensemble selection works.
Golden features, feature selection, feature discovery, KMeans features, and boost-on-errors are off by default. You can enable supported stages explicitly; see Golden Features, feature selection and feature discovery. Shared feature selection across nested folds can introduce validation leakage; those experimental runs are marked in their reports.
Advanced settings
You can override individual settings without creating a new mode. For example,
algorithms restricts the model families and validation_strategy supplies
your own splits. For the available arguments, see the API reference.
Optional models and Optuna
Compete can automatically include installed RealMLP and TabM backends, and
Kumo/TabICLv2 when the tested backend and CUDA are available. For CPU TFM
runs, select algorithms=["Kumo", "TabICLv2"] explicitly in Compete.
TFMs are not available in Explain, Perform or Optuna mode.
Compare available algorithms.
Optuna is an additional tuning mode for searches using optuna_time_budget.
See the API reference for its controls. Its ordinary validation
defaults differ from Compete's nested policy.
Algorithm early stopping in Compete
Algorithm early stopping in Compete
Ordinary Compete runs automatically stop further original-feature tuning of algorithms that remain uncompetitive after at least three successful, distinct configurations. There is no additional argument. The existing search settings and time budget still determine how many initial configurations can run. Changing only a random seed does not count as a new configuration; failed and resource-skipped trials do not count.
The first successful, finite-scoring individual model after validation adjustment provides a fixed reference. With every metric expressed in AutoML's lower-is-better convention, further trials are skipped when:
algorithm_best_loss - leader_loss > 0.20 * (reference_loss - leader_loss)
An algorithm must retain at least 80% of the leader's improvement over the reference. This is not the same as requiring its raw error to be within 20% of the leader. For example, reference log loss 1.0 and leader log loss 0.4 permit an algorithm's best log loss up to 0.52. The same rule handles all built-in and custom metrics, including negative scores, and is unchanged by a positive scale factor or a score offset. Invalid comparisons and a leader that has not improved over the reference do not trigger early stopping.
The check runs during random search and original-feature hill climbing, including immediately before each fit. It compares completed models with the same validation setup and sample weights. Changed-feature trials, their hill climbing, stacking, and ensemble selection keep their existing opportunities. Previously trained models and predictions remain available. Other modes, Optuna searches, and fairness-driven searches retain their existing policies.
The stage ratios stay the same. Eligible algorithms share the tuning allowance, subject to remaining wall-clock limits; unused time can carry into later stages. This can improve how a fixed budget is spent without shortening the whole run.
AutoML prints one concise message per paused algorithm. The Markdown report links
to algorithm_early_stopping.json, containing reference/leader scores and skipped
candidates. Policy state is also saved in progress.json, so resumed runs retain
their decisions. Older interrupted runs without policy metadata keep their
original search behavior. Loading a completed model for prediction requires no
new calculations.
Candidate time budgets in Compete
Candidate time budgets in Compete
With a total time limit, ordinary Compete searches share each stage's allowance among the participating algorithms. Default trials receive a whole-model budget, including all validation folds and repeats, instead of a minimum of 60 seconds per fold. Time spent on failed and timed-out attempts also consumes the algorithm's stage allowance. This spending safeguard is separate from accuracy early stopping: it does not label an algorithm uncompetitive before three successful configurations.
Before each fold, AutoML checks whether the remaining folds can fit the candidate allowance. Backend fitting receives at most 80% of its current per-fold allowance, leaving room for preparation and prediction. Deadlines are cooperative: individual noninterruptible operations may overrun them. A timed-out configuration is retried only when its allowance exceeds the previously observed timeout duration; changed configurations and feature representations have separate histories.
Expected deadline stops are saved as skipped candidates in budget_skips.json,
linked from the model report, and summarized in the console. Genuine failures
remain in errors.md. Timing history is restored on resume. An explicit
model_time_limit retains control over per-model fitting, and searches without a
total time limit do not receive the new stage spending caps.
Stacking admission also reuses completed-fold timing from candidates that could not finish. Compatible subsequent candidates are skipped before training when the measured full-model estimate exceeds their allowance. For RealMLP, equal or larger depth and width can reuse an estimate when input representation, validation, device, batch settings and other cost settings match. Smaller networks or mixed depth/width changes receive a new probe; no linear speedup is assumed. Other algorithms initially require equivalent cost settings. A sufficiently larger allowance permits another attempt. Successful measurements can revise estimates.
Observations persist in progress.json; budget-skip evidence identifies the source
attempt, estimated completion time and allowance. Admission skips do not create
observations or count toward accuracy early stopping. Existing model names and
stacking limits are unchanged.
Feature-engineering stage ratios
Feature-engineering stage ratios
Golden features, feature discovery, and KMeans are separate, sequential stages when enabled. All three are disabled by default. Their combined scheduling budget is distributed as 30% golden features, 50% feature discovery, and 20% KMeans. Each allocation covers feature preparation and training the models that use those features; it is not a guaranteed runtime.
With all stages enabled, including mixed categorical encoding, the weights are:
| Stage | Weight | Approximate allocation in a one-hour Compete run |
|---|---|---|
| Golden features | 0.0375 | 100 seconds |
| Feature discovery | 0.0625 | 167 seconds |
| KMeans features | 0.0250 | 67 seconds |
Their combined weight remains 0.125. Other stages keep their existing allocations. If a feature stage is disabled or ineligible, its previous allocation is omitted from the combined budget, and the 30:50:20 proportions are normalized among the remaining feature stages. For example, golden features and feature discovery without KMeans share their available budget in a 3:5 ratio. Unused time can carry forward to later stages.
No API arguments or model-name postfixes change. These scheduling weights apply
when using total_time_limit; an explicit model_time_limit retains its existing
behavior. Previously built release wheels and their benchmark runs are unchanged.
Earlier release candidates: saved-run policies
Historical policies for saved runs
The 1.4.0 rules above supersede these earlier defaults for new runs. Saved runs retain their recorded policy.
RC20 uses Kumo Large/16 and TabICLv2/8 in the default stage, then Kumo Medium/8 and Small/8 in the first and second tuning rounds. Smaller checkpoints are independent candidates even when Large succeeds. Automatic estimator-count tuning is disabled. The frozen RC20 benchmark retains nested candidate scoring, full-data TFM inference, and pooled outer scoring with 1% new-member admission. Multiple Kumo sizes may enter the same ensemble, without a family cap.
RC19 defaults golden_features and features_selection to disabled in every
mode. The RC19 benchmark explicitly disables both stages, while retaining pooled
outer ensemble scoring and the 1% new-member improvement threshold. Explicit
opt-in and loading previously saved feature transformations remain supported.
RC18 introduced the existing golden_features and features_selection controls
inside automatic nested CV. After initial tuning and categorical encoding,
Golden Features are discovered on the first sampled inner split of the first
outer fold. Their formulas are frozen and shared across all folds. Feature
selection follows, using a LightGBM selector fitted on that inner training
partition and five-repeat permutation importance on its validation partition.
Columns must exceed the random-feature importance (floored at zero plus 1e-6).
Selection takes the feature set of the completed candidate with the best inner
score. Generated columns are included only when that candidate uses them;
otherwise selection considers only original columns. The source candidate and
its feature definition are recorded in the selection cache. Original, _GoldenFeatures, and
_SelectedFeatures candidates remain available for further tuning and ensembling.
This is a shared-feature experiment: labels used to select the shared features
can later appear in other outer holdouts. Reports and candidate audits explicitly
mark this cross-fold validation leakage. Saved RC15–RC17 policies keep their
previous behavior. Frozen artifacts under shared_nested_features/ bind formulas
and retained columns to the discovery data/split/settings using checksums.
Preparation consumes the same total training budget as candidate fitting.
Predictions accept raw original columns. Each model generates its frozen formulas before applying its retained-column mask; a dropped input can still be a formula dependency. Missing-value statistics and scaling remain fitted within each model's training partition, and are serialized for prediction/reload.
RC15 introduced nested CV with stacking, feature discovery, KMeans features, boost-on-errors, and pre-split rare-class oversampling disabled. It removed the ensemble family limit and initially used 30 greedy rounds without an admission threshold. Later releases changed the threshold and row boundary as described above. Completed models can be reloaded; interrupted partial candidates are retained and excluded rather than silently retrained.
Automatic validation for small datasets (RC14)
Starting with 1.4.0rc14, Perform, Compete and Optuna use up to eight folds and one
repeat when training data has fewer than 5,000 rows or a classification task
has fewer than 250 samples in its smallest class. Classification folds are
shuffled and stratified, with split seed 1906. The smallest class count caps the
fold count: five examples means at most five folds. Larger-data mode defaults
are unchanged. Short Compete budgets may reduce the folds or choose a holdout split.
Explicit validation_strategy settings and saved runs retain their settings.
RealMLP and TabM use one neural seed per configuration, with shared checkpoint
selection across its folds. Model training uses the base seed plus the repeat
index, including when repeats are explicitly requested. Validation scores are
averaged over folds; TabM keeps fixed k=32. Small-data stacking stays disabled.
The default Kumo candidate remains Large with 16 estimators.
RC14 Compete runs shortlist candidates within each algorithm family before greedy selection, using the training row count after removing missing targets and before oversampling. CV folds, repeats, and neural seeds do not multiply this count.
| Training rows | Maximum candidates per family |
|---|---|
| Below 1,000 | 1 |
| 1,000–4,999 | 2 |
| 5,000–9,999 | 3 |
| 10,000–14,999 | 4 |
| 15,000–20,000 (inclusive) | 5 |
| Above 20,000 | No limit |
Each complete model configuration counts as one candidate. Feature-engineered variants share their algorithm's family. Within each family, the candidates with the lowest saved validation loss are retained (mean fold loss for CV); equal losses preserve candidate order. Existing fairness and prediction-time eligibility checks apply before the family limit. This shortlist does not reduce model training. Other modes keep their unrestricted candidate pools.
The resolved policy is saved in params.json and progress.json for consistent
resumption. Ensemble/ensemble.json records the row count, limit, and included and
excluded candidates per family. Older runs without policy metadata retain their
original pool; saved ensemble weights are unchanged. The earlier frozen RC14
benchmark wheel also retains its original unrestricted pool.
The selector still uses 30 rounds, allows repeated selection to adjust weights, and has no minimum improvement threshold for admitting a new member. The previous 0.5% admission threshold remains disabled for new RC14 ensembles.