Skip to content

benchmark()

Supply PV data, a configuration and model identifiers. Data must contain unique timezone-aware quarter-hour target_time and numeric pv_generation_mw. Include warm-up history and evaluation actuals. No observations are fetched automatically.

LightGBM trains once before evaluation; TSFMs can perform expensive inference. Weather requires a prepared local store. Rankings use common finite support and retain separate failure/availability accounting. See the complete executable quickstart, explanatory first benchmark and real-data notebook.

benchmark

benchmark(*, data: DataFrame, config: BenchmarkConfig, models: Sequence[str] = ('seasonal_persistence_48h',), target: str = 'belgium_pv', data_source: str = 'caller-supplied snapshot; provenance not independently verified', weather: WeatherStore | None = None) -> BenchmarkResult

Run explicit local day-ahead benchmarks using existing adapters and scoring.

Parameters:

Name Type Description Default
data DataFrame

Unique aware quarter-hour target_time and nullable real pv_generation_mw (national Belgium, MW). Include warm-up history, any training labels and evaluation actuals. Missing values remain missing.

required
config BenchmarkConfig

Schedule, cutoff assumptions, scoring policy and optional pre-test fit.

required
models Sequence[str]

Identifiers from available_models(); no automatic winner selection.

('seasonal_persistence_48h',)
target str

Only belgium_pv is implemented.

'belgium_pv'
data_source str

Caller provenance assertion recorded in metadata, not independently verified.

'caller-supplied snapshot; provenance not independently verified'
weather WeatherStore or None

Prepared local historical NWP store, required only by the weather adapter.

None

Returns:

Type Description
BenchmarkResult

Complete predictions, origins, effective config and metadata. Leaderboards score raw predictions on common finite pairs with failure accounting.

Raises:

Type Description
ValueError

Invalid target, models, data or prerequisites.

ImportError

Missing optional model support.

BacktestOriginError

Strict origin failure, preserving the underlying cause.

Notes

Nothing is saved, PV/NWP is never fetched, and TSFM downloads require explicit opt-in via adapter config. LightGBM is trained once when requested. Continue mode records origin failures in results.origins.

Example: benchmark(data=pv_data, config=config).leaderboard().