← Databricks Machine Learning Associate: training and operations
05 / 7 · 40 MIN

Training, pipelines, and parameter search

Compare alternatives with controlled cost and validation.

Concept and mechanism

Choose a task before a model family. Predicting processing minutes is regression; deciding whether a window is exceeded is classification, with its own threshold and consequences. Define a simple baseline to determine whether complexity adds value. In Spark ML, an Estimator learns through fit and produces a model operating as a Transformer. A Pipeline orders preparation and learning stages; the PipelineModel applies fitted stages. Fitting again on evaluation data compromises comparison. Preserve the column contract between training and inference. Distributing a search across configurations does not mean that each algorithm becomes internally distributed.

Guided application

Grid search visits defined combinations; random search samples configurations; adaptive methods use earlier results to guide new choices. In legacy Hyperopt, fmin minimizes the objective, so a metric that should increase requires a direction change. max_evals limits trials, not folds. SparkTrials parallelizes single-machine models, whereas an objective already using distributed MLlib training needs another strategy, such as Trials in the documented context. The blueprint retains these concepts, but for new projects confirm supported options such as Optuna or Ray Tune. Four depths and three regularization settings produce twelve configurations. Four folds require 48 cross-validation fits; a final refit adds one, totaling 49.

IN PRACTICE

More parallelism may reduce elapsed time without reducing the logical fit count.

Common pitfalls

Maximizing a loss; counting trials as folds; confusing trial parallelism with distributed training.

Related topics: Environment, AutoML, and reproducibility · Temporal features and consistency · MLflow, registry, and promotion

Take this idea with you

Plan the search around required evidence and execution budget.

Create account

Reference: Hyperopt fmin Trials and SparkTrials concepts · 2025-03-01