ForeBlocks Docs
Modular time-series forecasting for PyTorch
foreblocks provides forecasting models, training, evaluation, and preprocessing. darts is a standalone differentiable neural-architecture-search package. foretools offers companion utilities for synthetic data, feature engineering, decomposition, and hyperparameter search. All three ship in the same foreblocks wheel. The docs guide you from a simple baseline to advanced architectures and architecture search.
ForecastingModel + Trainer + ModelEvaluator for a quick baseline.TimeSeriesHandler converts raw [T, D] arrays into training windows automatically.foretools 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 Custom Mamba for stronger models. See Advanced Transformer Features for LLRD, per-layer dropout, GateSkip, MoD, mHC, and Advanced MoE for production tuning.
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.
Recommended reading order
foreblocks and foretools connect.Install by intent
| Need | Command | Next page |
|---|---|---|
| Core forecasting | pip install foreblocks | Getting Started |
| Raw-series preprocessing | pip install "foreblocks[preprocessing]" | Preprocessor Guide |
| Architecture search (DARTS) | pip install "foreblocks[darts]" | DARTS Guide |
| Experiment tracking (MLTracker) | pip install "foreblocks[mltracker]" | Web UI |
| VMD decomposition | pip install "foreblocks[vmd]" | VMD Guide |
| Wavelet preprocessing | pip install "foreblocks[wavelets]" | Preprocessor Guide |
| All runtime extras | pip install "foreblocks[all]" | Overview |
Documentation map
Tutorials
Step-by-step runnable paths:
Guides
Topic-based deep dives:
- Preprocessor
- Custom Blocks
- Transformer
- Mixture of Experts
- Custom Mamba
- KAN Backbone
- DARTS
- Evaluation & Metrics
- Uncertainty Quantification
- Web UI
- Troubleshooting
Foretools
Companion utilities and helpers:
- Foretools Overview
- Time Series Generator
- BOHB Search
- VMD Decomposition
- AutoDA Augmentation
- Feature Engineering
Architecture
Internals and system notes:
Stable public entry points
Start here before using deep imports:
Core
from foreblocks import (
ForecastingModel,
Trainer,
ModelEvaluator,
TimeSeriesHandler,
TimeSeriesDataset,
create_dataloaders,
ModelConfig,
TrainingConfig,
)
```python
### Uncertainty
```python
from foreblocks.core import ConformalPredictionEngine
```python
### Wavelet & frequency attention
Spectral attention is available today through the transformer stack rather than a
standalone import — select it with the `att_type` argument:
```python
from foreblocks import TransformerEncoder
# Wavelet-domain (Haar DWT) attention
enc = TransformerEncoder(input_size=8, d_model=64, num_layers=2, att_type="dwt")
# Frequency-domain (FEDformer-style) attention
enc = TransformerEncoder(input_size=8, d_model=64, num_layers=2, att_type="frequency")