Repository navigation
Forecasting Phase 2 Roadmap
This page was moved from repository documentation to the project wiki.
Original repository path before migration: docs/pr_plans/forecasting_phase_2_roadmap.md.
This document is the source-of-truth for the second refactor cycle of the forecasting stack in
Fedot.Industrial.
Phase 1 established the core direction:
- forecasting-first runtime;
- tensor-native internal contracts;
- primitive-stage vocabulary;
- named shell/composite models;
- benchmark-aligned diagnostics.
Phase 2 is about turning that foundation into a cleaner and more explicit execution model:
- finish shrinking legacy forecasting dependencies;
- move from model-level orchestration to primitive-graph orchestration;
- make tuning and evaluation explicit at the stage level;
- reduce the remaining hidden coupling between shell models and legacy FEDOT infrastructure.
Phase 2 starts from the following already-implemented baseline:
-
ForecastTensorBatchand tensor-native forecasting runtime are in place. - Primitive stages already exist:
hankelisationsvd_decompositionrandomized_svd_decompositiontensor_decompositionexplained_variance_truncationstatistical_rank_truncationexpert_rank_truncation
- Named shell/composite models already exist:
lagged_ridge_forecasterlow_rank_lagged_ridge_forecasterhybrid_ensemble_forecasterokhs_fdmd_forecastermssa_forecasterhavok_forecaster-
ssa_forecasteras compatibility wrapper
-
benchmark/v2already persists:- regime diagnostics
- generic stage diagnostics
- OKHS stage diagnostics
- hybrid ensemble diagnostics
- Legacy strategy entrypoints already redirect forecasting operations toward the new runtime in key paths.
The main goal of Phase 2 is:
make the primitive graph the real source-of-truth for forecasting training, tuning, and execution, rather than only the diagnostic vocabulary around model wrappers.
In practice this means:
- shell models become thinner;
-
okhs_forecastingstops being a hidden backend-monolith; - tuning is performed over explicit stage groups;
- legacy strategy modules stop containing meaningful forecasting logic;
- repository metadata and benchmark workflows speak the same architectural language.
The current legacy strategy modules are already much thinner, but they still remain a hidden dependency surface.
Phase 2 should make them clearly secondary:
- forecasting-specific logic should no longer live inside
industrial_preprocessing_strategy.pyindustrial_model_strategy.py
- these modules should retain only:
- compatibility shims
- redirects
- minimal delegation
Desired result:
- the forecasting runtime can be reasoned about without reading legacy multidimensional dispatch code.
okhs_fdmd_forecaster already exposes a shell-first contract, but the kernel-level backend still concentrates too much
orchestration.
Phase 2 should continue extracting:
- trajectory planning
- decomposition representation decisions
- rank selection decisions
- prediction orchestration
- anti-smoothing logic
Desired result:
-
okhs_forecastingbecomes a compatibility shell over explicit primitive/runtime helpers; -
okhs_fdmd_headbecomes a realistic next candidate for standalone primitive execution.
Current runtime and repository layers already expose stage params, but tuning still happens mostly at the wrapper/model level.
Phase 2 should introduce a more explicit tuning contract:
- trajectory stage first
- decomposition/rank stage second
- forecast head stage third
Desired default:
-
SequentialTunerfor complex models and composite pipelines -
SimultaneousTuneronly for small/stable spaces
The repository already knows about primitives and shell models, but not every first-class forecasting path is fully normalized yet.
Phase 2 should ensure:
- repository metadata
- defaults
- search space
- primary forecasting model lists
- benchmark adapter aliases
all reflect the same canonical forecasting vocabulary.
Neural models are still closer to standalone worlds than to primitive-stage members.
Phase 2 should prepare the bridge, without trying to fully solve deep forecasting in one pass:
- define what a neural forecast head should look like in the primitive graph
- clarify how it plugs into:
- trajectory transforms
- decomposition/rank stages
- composite ensembles
Goal:
- reduce forecasting responsibility inside legacy strategy modules to the minimum possible shell.
Scope:
- remove or isolate remaining forecasting-specific branches from:
industrial_model_strategy.pyindustrial_preprocessing_strategy.py
- keep only:
- compatibility wrappers
- redirect helpers
- narrow public entrypoints
Acceptance:
- no new forecasting behavior depends on legacy multidim dispatch internals;
- forecasting redirects are explicit and tested.
Current progress:
- centralized redirect helpers now live in
forecasting_runtime_strategy.py; - legacy model and preprocessing strategies delegate through the shared redirect policy instead of duplicating it locally;
- forecasting wrappers continue to exist, but the redirect contract is now source-of-truth and test-covered;
- the legacy redirect
__new__logic is now extracted into dedicated forecasting boundary mixins, so the old strategy modules are thinner and more explicit; - neural forecasting strategy was extracted from
industrial_model_strategy.pyinto a dedicated forecasting-oriented module, which further reduces forecasting-specific responsibility inside the legacy strategy layer.
Goal:
- continue decomposing
okhs_forecastingfrom backend-monolith into explicit runtime helpers.
Scope:
- separate fit-plan and predict-plan responsibilities further;
- isolate remaining decomposition/rank/trajectory coordination;
- reduce direct orchestration living in the kernel class;
- keep compatibility behavior stable for benchmark and shell users.
Acceptance:
-
OKHSForecasterbecomes mostly lifecycle/state shell; - extracted helpers cover the substantive stage decisions.
Current progress:
- fit-plan, prediction-plan and optimization-info construction are now extracted into
okhs_runtime.py; - DMD model instantiation fallback and projected-vs-dense prediction execution now live in pure helpers;
- direct OKHS fit and recursive direct prediction now also delegate through runtime helpers, so the kernel-level forecaster mostly coordinates lifecycle, state and compatibility behavior;
- the remaining shell-thinning work is now mostly about reducing the last pieces of inline orchestration and aligning the extracted helper layer with future standalone forecast-head primitives.
Goal:
- implement a practical tuning flow that matches the primitive graph.
Scope:
- introduce stage-group tuning helpers:
- trajectory stage
- decomposition/rank stage
- forecast head stage
- define per-model defaults for sequential tuning
- make these flows usable by:
- shell models
- composites
- benchmark experiments
Acceptance:
- tuning no longer depends on accidental wrapper-level parameter blobs;
- stage tuning order is explicit and reproducible.
Current progress:
- a typed stage-tuning contract now exists for stage-native forecasting shells and compatibility wrappers;
- canonical groups are published in the same order across models: trajectory, decomposition/rank, forecast head and ensemble where applicable;
- implementations can already expose machine-readable tuning plans, which prepares the next cycle for actual sequential tuning execution;
- stage-specific search-space slices are now derivable from the same contract, so wrapper-level tuning no longer needs to guess parameter ownership per stage;
- a pure sequential stage-tuning executor now exists and records applied vs ignored parameters per stage, which gives the next cycle a stable foundation for real tuner orchestration;
- implementations can already expose
run_stage_tuning(...)over the new executor, so the next refactor step can focus on plugging this layer into real FEDOT/objective runtimes instead of inventing stage orchestration from scratch; - a dedicated stage-tuning runtime bridge now evaluates stage candidates on real forecasting series through explicit holdout splits and forecasting metrics, which means stage tuning is no longer limited to abstract objective callbacks;
- stage-native implementations can now expose
run_stage_tuning_on_series(...), returningbaseline vs tunedevaluation reports with real model diagnostics.
Goal:
- align metadata, defaults, aliases, and optimization space with the actual stage-first forecasting stack.
Scope:
- normalize model names and aliases;
- expand or prune
PRIMARY_FORECASTING_MODELSusing the new architecture; - ensure all first-class forecasting shells have:
- defaults
- repository entries
- search-space presence when appropriate
Acceptance:
- repository vocabulary matches actual supported forecasting shells and primitives;
- benchmark adapters and routing aliases stay consistent.
Current progress:
- canonical forecasting alias normalization now lives in a dedicated repository helper module;
- default parameter lookup, benchmark adapter resolution and routing-family mapping share the same alias policy;
- stage-native forecasting shells now have explicit search-space coverage, including canonical short aliases for
mssaandhavok.
Goal:
- make
benchmark/v2a full architectural mirror of the stage-first stack.
Scope:
- ensure every stage-native forecasting model persists meaningful stage artifacts;
- add missing family-level summaries where useful;
- improve model-family comparison using the primitive vocabulary rather than raw model names.
Acceptance:
- publication pack can compare forecasting families and stage behaviors consistently across shells/composites.
Current progress:
-
benchmark/v2can now persist optionalstage_tuning_reportpayloads for stage-native forecasting models without changing the default fast path; - a dedicated benchmark artifact flow now publishes:
- series-level
*_forecasting_stage_tuning.json - aggregate
forecasting_stage_tuning.{csv,tex,parquet} - aggregate
forecasting_stage_tuning_family_summary.{csv,tex,parquet}
- series-level
- benchmark-side tuning reports already include
baseline vs tunedmetric comparison and the chosen best-parameter payload, which makes cohort-level tuning analysis possible in the existing publication pack; - family-level summaries now expose tuning improvement rate, routing-family match rate and average gain, so the benchmark can already compare whether tuning helps each forecasting family on a cohort rather than only on isolated series;
- routing publication artifacts now also include family-level winner comparisons, which
makes
recommended family vs actual winner familyanalysis available at cohort level without reconstructing it from raw run records.
Goal:
- define the first clean integration path for neural forecasting into the primitive graph.
Scope:
- specify neural head interface expectations;
- connect at least one neural forecaster conceptually to:
- stage diagnostics
- benchmark metadata
- composite branch participation
Acceptance:
- neural forecasting is no longer treated as an architectural exception;
- a future Phase 3 can add first-class neural primitive heads without redesigning the runtime again.
Current progress:
- repo-native neural forecasting models now have an explicit bridge layer through
neural_forecast_head_bridge.py; - neural heads already expose the same high-level stage vocabulary:
trajectory_transformdecompositionrank_truncationforecast_head
- stage-tuning plans and stage-search spaces now support:
patch_tst_modeltcn_modeldeepar_modelnbeats_model
- benchmark-v2 adapter resolution now understands these neural runtime heads, so they can participate in the same stage-aware diagnostics pipeline as the rest of the forecasting stack;
- benchmark-v2 execution is now covered by a focused regression path for native neural heads:
- stage diagnostics artifacts
- stage-tuning artifacts
- family-level stage-tuning summary rows for
neural_forecaster
- there is now a dedicated runnable benchmark-v2 example for the neural bridge path:
benchmark/v2/examples/neural_stage_suite_140426.py
- there is now a family-level runnable suite for native neural heads:
benchmark/v2/examples/m4_neural_family_suite_140426.py
- routing family mapping also recognizes native neural heads as
neural_forecaster, which prepares the next cycle for routing- and benchmark-level family comparisons that include neural models as first-class citizens.
Close signal for PR-6:
- native neural heads are now validated across:
- stage vocabulary
- stage-tuning contracts
- runtime bridge on real holdout evaluation
- benchmark-v2 adapter execution
- benchmark-v2 stage artifacts and family summaries
- this is enough to treat
PR-6as closed for Phase 2, even though a future phase may still replace the bridge with first-class neural primitive heads.
Recommended order:
-
PR-1Legacy Forecasting Boundary Cleanup -
PR-2OKHS Primitive-Orchestration Extraction -
PR-3Explicit Stage-Tuning Contract -
PR-4Repository and Search-Space Consolidation -
PR-5Benchmark Stage Adoption Completion -
PR-6Neural Forecast Head Bridge
Rationale:
-
PR-1andPR-2reduce hidden coupling before tuning work gets deeper. -
PR-3should sit on top of a cleaner runtime and cleaner OKHS shell. -
PR-4keeps repository/search-space honest after the tuning contract is clarified. -
PR-5is stronger when the vocabulary and runtime contract are already stabilized. -
PR-6should land only after the non-neural primitive graph is coherent.
Phase 2 should keep the same testing philosophy as Phase 1:
- facade/boundary tests for public shells and adapters;
- pure-helper tests for extracted planning/decision logic;
- invariant-oriented tests for:
- deterministic routing
- stable stage metadata
- stage artifact persistence
- repository alias consistency
- tuning-order determinism
Priority test slices:
- targeted
pytestslices for:test_forecasting_runtime_strategy.pytest_forecasting_composites.pytest_okhs_runtime.pytest_okhs_forecasting_api.pytest_benchmark_v2.py- repository/search-space contract tests where added
Phase 2 can be considered complete when all of the following are true:
- Legacy strategy modules no longer contain meaningful forecasting business logic.
-
okhs_forecastingis primarily a shell over extracted primitive/runtime helpers. - Tuning over the primitive graph is explicit and stage-aware.
- Repository/default/search-space vocabulary matches the actual shell-first forecasting stack.
-
benchmark/v2compares forecasting families using the same stage vocabulary used by runtime and repository layers. - Neural forecasting has a defined bridge into the primitive graph, even if not yet fully expanded.
To keep scope realistic, Phase 2 does not aim to:
- redesign all deep forecasting models completely;
- replace every remaining FEDOT boundary object;
- fully remove every legacy compatibility shim;
- solve all forecasting quality issues model-by-model.
Instead, it aims to finish the architectural transition so later model-quality work happens on a cleaner base.
Phase 2 should be executed as a PR stack, not as one giant branch-wide rewrite.
Reason:
- the architecture is already moving in the right direction;
- the remaining risk is mostly hidden coupling and vocabulary drift;
- smaller PRs make it easier to validate that the new primitive graph remains the real source-of-truth.