Skip to content

innovate.fit_frames

All current Python definitions

View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4

def fit_frames(
model: str,
datasets: Iterable[pl.DataFrame | pl.LazyFrame],
*,
model_options: dict[str, Any] | None = None,
observed_columns: list[str] | None = None,
fit_options: dict[str, Any] | None = None,
) -> list[FitResult | Exception]: ...

Fit an iterable of Polars frames sequentially and retain input failures.

Each frame uses the same options, but is fitted independently. This wrapper does not enable the native batch worker pool; use fit_batch for native payload batches with worker control.

  • model: Native model key used for every frame.
  • datasets: Iterable of DataFrames or LazyFrames; lazy inputs are collected individually at their fit boundary.
  • model_options: Shared native constructor options; defaults to an empty mapping.
  • observed_columns: Shared ordered observation column names. None selects observed in every input frame.
  • fit_options: Shared native fitting options; None uses kernel defaults.

List in input order containing a FitResult or the caught exception for each frame. ValueError (including NativeError), TypeError and PolarsError are retained as values, so callers must inspect every element.

  • Exception: Errors outside the retained categories, including failures while advancing the input iterable, propagate to the caller.