Skip to content

ForeBlocks Docs

foreBlocks v0.1.19 | Documentation

Modular time-series forecasting for PyTorch

foreblocks provides forecasting models, training, evaluation, and preprocessing. foretools offers companion utilities for synthetic data, feature engineering, decomposition, and hyperparameter search. The docs guide you from a simple baseline to advanced architectures and architecture search.

Start smallUse ForecastingModel + Trainer + ModelEvaluator for a quick baseline.
Raw series readyTimeSeriesHandler converts raw [T, D] arrays into training windows automatically.
Search includedDARTS guides cover screening, bilevel search, retraining, and analysis.
Toolbox utilitiesforetools adds synthetic data generation, BOHB search, VMD decomposition, and feature engineering.

Choose your route

Path 01

Train a baseline model

Start with the smallest reliable public API path. Validates imports, dataloader shapes, and evaluation before adding extras.

Path 02

Handle raw time series

Use TimeSeriesHandler to automatically scale, filter, window, and prepare raw multivariate arrays.

Path 03

Explore advanced backbones

Learn transformer attention, MoE routing, custom blocks, and Hybrid Mamba for stronger models.

Path 04

Automate architecture search

Run DARTS to automatically discover optimal architecture combinations from a defined operation pool.

Path 05

Add uncertainty intervals

Use conformal prediction to generate prediction intervals when you need coverage guarantees.

Path 06

Use companion utilities

Access synthetic data generation, BOHB search, VMD decomposition, and feature engineering tools.

1. Run a baselineFollow Getting Started to validate the core training loop with minimal dependencies.
2. Understand the stackRead Overview to see how foreblocks and foretools connect.
3. Explore the public APIBrowse Public API to learn stable imports before diving into subsystems.
4. Choose your workflowPick a guide based on your task: preprocessing, transformers, DARTS search, uncertainty, or foretools.

Install by intent

NeedCommandNext page
Core forecastingpip install foreblocksGetting Started
Raw-series preprocessingpip install "foreblocks[preprocessing]"Preprocessor Guide
Architecture search (DARTS)pip install "foreblocks[darts]"DARTS Guide
Experiment tracking (MLTracker)pip install "foreblocks[mltracker]"Web UI
VMD decompositionpip install "foreblocks[vmd]"VMD Guide
Wavelet utilitiespip install "foreblocks[wavelets]"Coming soon
All runtime extraspip install "foreblocks[all]"Overview

Documentation map

Tutorials

Step-by-step runnable paths:

Guides

Topic-based deep dives:

Foretools

Companion utilities and helpers:

Architecture

Internals and system notes:

Stable public entry points

Start here before using deep imports:

Core

python
from foreblocks import (
    ForecastingModel,
    Trainer,
    ModelEvaluator,
    TimeSeriesHandler,
    TimeSeriesDataset,
    create_dataloaders,
    ModelConfig,
    TrainingConfig,
)
python
from foreblocks.darts import (
    DARTSTrainer,
    DARTSConfig,
    DARTSTrainConfig,
    FinalTrainConfig,
    MultiFildelitySearchConfig,
)

Uncertainty

python
from foreblocks.core import ConformalPredictionEngine

Hybrid Mamba

python
from foreblocks.hybrid_mamba import (
    HybridMambaBlock,
    HybridMamba2Block,
    TinyHybridMamba2LM,
)

Wavelet utilities (coming soon)

python
from foreblocks.blocks import WaveletAttention
from foreblocks.blocks import WaveletConv1d
The docs now mirror the package split more intentionally: stable forecasting first, optional extras second, and specialist subsystems framed as branches instead of default prerequisites.

Notes

  • The canonical docs source lives in docs/.
  • The published versioned docs live under /docs/.
  • foretools utilities are documented here even when not re-exported from top-level foreblocks.

MIT License