Search and Parallelism
Use this sub-skill when the task is to configure or diagnose auto-sklearn search/resources, Dask parallelism, SMAC strategy callbacks, ensemble construction, disk outputs, or result inspection after a fit.
Route here for
- Choosing
time_left_for_this_task,per_run_time_limit,memory_limit,n_jobs,dask_client, thread-environment limits,tmp_folder, and disk-retention knobs. - Restricting the search space with
includeorexcludedictionaries and built-in component IDs. - Selecting SMAC behavior with
get_smac_object_callback,smac_scenario_args, random search/ROAR, successive halving, orget_trials_callback. - Planning single-machine
n_jobsruns, attaching a user-created Dask client, or explaining the internalLocalDask/UserDaskbehavior. - Designing sequential search followed by post-hoc
fit_ensemble(). - Controlling ensembles with
ensemble_class,ensemble_kwargs,ensemble_nbest,max_models_on_disc,disable_evaluator_output, andload_models. - Inspecting
sprint_statistics(),leaderboard(),show_models(),cv_results_,performance_over_time_,runhistory_, and ensemble model weights.
Route elsewhere
- Basic estimator selection,
fit,predict,predict_proba,score, persistence, and minimal smoke workflows: estimators. - Data formats, train/test split semantics, resampling choices, metrics, custom scorers, and
refit()requirements after CV/custom splits: data-metrics-validation. - Writing or registering custom classifiers, regressors, preprocessors, or component search spaces: custom-components.
- Large metadata regeneration,
metadata_directory, AutoSklearn2 portfolios, and maintenance scripts: metadata-maintenance.
Fast operating checklist
- Decide the workflow mode:
sequential: one worker; optionally setensemble_class=Noneduring search and callfit_ensemble()later.parallel: setn_jobs > 1or pass a DaskClient; guard script entry points withif __name__ == "__main__":.random: supply aget_smac_object_callbackthat returns a SMAC ROAR/random-search facade.successive-halving: supply aget_smac_object_callbackthat returnsSMAC4AC(..., intensifier=SuccessiveHalving, ...)and setsta_kwargs["budget_type"].
- Budget resources conservatively. In multi-process search, total model-training memory can approach
n_jobs * memory_limitplus the parent process and Dask overhead. If the dataset is large, do not simply raisen_jobs. - Set thread caps before Python starts when using multiple workers or when predicting/scoring large ensembles:
```bash
export OPENBLAS_NUM_THREADS=1
export MKL_NUM_THREADS=1
export OMP_NUM_THREADS=1
```
- If using Dask workers across processes or machines, ensure all workers can read/write the same
tmp_folderand output area. - Choose
include/excludewith valid component IDs. Useincludefor tight, interpretable, or fast searches; useexcludeto remove only known bad/expensive components. Do not set both. - Keep evaluator output enabled unless the workflow is analysis-only and does not need prediction or ensembles.
disable_evaluator_output=Truedisables saved models and predictions, sopredict()is unavailable. - Inspect results in layers:
sprint_statistics()for run counts,leaderboard()for tabular ranking,show_models()for ensemble members,cv_results_for GridSearchCV-like details, andperformance_over_time_for time curves.
Bundled references and helper
- Search and parallelism reference — constructor parameters, include/exclude IDs, Dask patterns, SMAC callbacks, and search-mode snippets.
- Results and ensembles reference — ensemble controls, disk outputs,
fit_ensemble(),leaderboard(),show_models(),cv_results_, andperformance_over_time_. - Troubleshooting reference — fork/forkserver/main-guard failures, memory and time limits, disk growth, Dask cleanup, and disabled evaluator outputs.
- scripts/build_search_config.py — safe snippet generator; emits JSON/Python configuration examples without importing or running auto-sklearn.
Validation before a future run
- Print the generated constructor kwargs and verify there is no simultaneous
includeandexclude. - Confirm
time_left_for_this_task >= 2 * per_run_time_limitif an ensemble is expected; auto-sklearn may cap per-run time to leave room for at least two models. - For parallel workflows, confirm code and data loading are inside a main guard or functions, shared storage is visible to workers, and user-owned Dask clients are closed by user code.
- For result inspection, verify
fit()completed and evaluator output was not disabled in a way that removed required predictions/models.