ncaa_eval.cli.train module

Training pipeline orchestration.

Assembles feature serving, model training, prediction generation, and run tracking into a single run_training() function consumed by the Typer CLI entry point.

ncaa_eval.cli.train.run_training(model: Model | StackedEnsemble, *, start_year: int, end_year: int, data_dir: Path, output_dir: Path, model_name: str, console: Console | None = None) ModelRun[source]

Execute the full train → predict → persist pipeline.

Dispatches to _run_ensemble_training when model is a StackedEnsemble; otherwise runs the single-model pipeline.

Parameters:
  • model – An instantiated model (stateful, stateless, or ensemble).

  • start_year – First season year (inclusive) for training.

  • end_year – Last season year (inclusive) for training.

  • data_dir – Path to the local Parquet data store.

  • output_dir – Path where run artifacts are persisted.

  • model_name – Registered plugin name (used in the ModelRun record).

  • console – Rich Console instance for terminal output. Defaults to a fresh Console() so callers (e.g. tests) can suppress output by passing Console(quiet=True).

Returns:

The persisted run metadata record.