spotforecast2-safe: Safety Profile
spotforecast2_safe provides deterministic forecasting components and a four-zone load demo for safety-conscious deployments. This page describes the package’s supported workflows and principal components.
Design Goals
- Explicit behavior: Validation and failure policies are configurable and observable.
- Reproducibility: Random seeds, compact model configurations, and single-threaded demo estimators make runs repeatable.
- Auditability: Focused interfaces, structured logging, and executable tests support review and verification.
Component Map
The following representative files support the zone-load demo and the public multitask pipeline (BaseTask/MultiTask/runner.run).
Orchestration & Pipelines
src/spotforecast2_safe/tasks/task_safe_zone_load_demo.pysrc/spotforecast2_safe/multitask/base.pysrc/spotforecast2_safe/multitask/multi.pysrc/spotforecast2_safe/multitask/runner.pysrc/spotforecast2_safe/processing/agg_predict.py
Data & Environmental Services
src/spotforecast2_safe/data/data_classes.pysrc/spotforecast2_safe/data/fetch_data.pysrc/spotforecast2_safe/weather/client.pysrc/spotforecast2_safe/weather/features.pysrc/spotforecast2_safe/calendar/holiday.py
Forecaster Engine
src/spotforecast2_safe/forecaster/base.pysrc/spotforecast2_safe/forecaster/recursive/_forecaster_recursive.pysrc/spotforecast2_safe/forecaster/recursive/_forecaster_equivalent_date.pysrc/spotforecast2_safe/forecaster/recursive/_warnings.pysrc/spotforecast2_safe/forecaster/utils.py
Preprocessing & Signal Cleaning
src/spotforecast2_safe/preprocessing/curate_data.pysrc/spotforecast2_safe/preprocessing/imputation.pysrc/spotforecast2_safe/preprocessing/outlier.pysrc/spotforecast2_safe/splitter/split.pysrc/spotforecast2_safe/preprocessing/rolling.pysrc/spotforecast2_safe/preprocessing/_differentiator.pysrc/spotforecast2_safe/preprocessing/_binner.pysrc/spotforecast2_safe/preprocessing/_common.py
Core Utilities
src/spotforecast2_safe/preprocessing/checking.pysrc/spotforecast2_safe/preprocessing/data_transform.pysrc/spotforecast2_safe/preprocessing/forecaster_config.pysrc/spotforecast2_safe/utils/convert_to_utc.pysrc/spotforecast2_safe/exceptions.py
Representative Public Building Blocks
The following classes and functions support the zone-load demo and public multitask pipeline.
Orchestration & Processing
agg_predict(Function)task_safe_zone_load_demo.main(Function) — console demotask_safe_zone_load_demo.cli(Function) — installed command-line adapterrun(Function,multitask.runner) — public single-call pipeline entry point
Multitask Pipeline (n-to-1 task)
BaseTask(Class) — shared prepare/detect/impute/exog stepsMultiTask(Class) — task dispatcherLazyTask(Class) — lazy fitting with optional cached tuningDefaultsTask(Class) — deterministic defaults baselinePredictTask(Class) — prediction from saved modelsCleanTask(Class) — cache removalagg_predictor(Function) — weighted aggregation of per-target packagesdefault_lgbm_forecaster_factory(Function) — LightGBM forecaster factoryrunner.run(Function) — one-call pipeline entry point
Data & Environmental Services
fetch_data(Function)fetch_holiday_data(Function)fetch_weather_data(Function)WeatherClient(Class)create_holiday_df(Function)convert_to_utc(Function)
Forecasting Engine
ForecasterRecursive(Class)ForecasterEquivalentDate(Class)ForecasterBase(Class)predict_multivariate(Function)initialize_lags(Function)initialize_weights(Function)initialize_estimator(Function)initialize_window_features(Function)
Preprocessing & Validation
agg_and_resample_data(Function)basic_ts_checks(Function)curate_holidays(Function)curate_weather(Function)get_start_end(Function)outlier_mask(Function)mark_outliers(Function)manual_outlier_removal(Function)get_outliers(Function)get_missing_weights(Function)split_rel_train_val_test(Function)check_y(Function)check_exog(Function)check_predict_input(Function)check_interval(Function)input_to_frame(Function)expand_index(Function)transform_dataframe(Function)check_extract_values_and_index(Function)
Feature Engineering
RollingFeatures(Class)TimeSeriesDifferentiator(Class)QuantileBinner(Class)
Maintaining the Inventory
The generated API reference is the authoritative inventory of the public surface. The test suite and coverage report provide executable evidence for the components described here.