ncaa_eval.cli.export module

Kaggle submission export orchestration.

Loads a trained model, builds a pairwise probability matrix for all teams in a season, and writes a Kaggle-format CSV.

ncaa_eval.cli.export.build_kaggle_submission(*, run_id: str, season: int, data_dir: Path) str[source]

Load a model and return a Kaggle submission CSV string.

Pure orchestration: loads the model, collects all team IDs for the season, builds the all-pairs probability matrix, and formats the CSV. No I/O side-effects — callers decide where to write the result.

Parameters:
  • run_id – Model run identifier.

  • season – Tournament season year (e.g. 2026).

  • data_dir – Path to the local data directory.

Returns:

CSV string with ID,Pred header and C(n,2) data rows.

Raises:
  • FileNotFoundError – If the run, model, or season games cannot be loaded.

  • TypeError – If the model type is not supported for Kaggle export.

ncaa_eval.cli.export.run_export(*, run_id: str, season: int, data_dir: Path, output: Path | None, console: Console | None = None) str[source]

Load a model and produce a Kaggle submission CSV.

Thin CLI wrapper around build_kaggle_submission that handles progress output and writing to a file or stdout.

Parameters:
  • run_id – Model run identifier.

  • season – Tournament season year (e.g. 2026).

  • data_dir – Path to the local data directory.

  • output – File path to write the CSV. None means stdout.

  • console – Rich Console instance for status output.

Returns:

The CSV string.

Raises:
  • FileNotFoundError – If the run or model cannot be loaded.

  • TypeError – If the model type is not supported for export.