-
Notifications
You must be signed in to change notification settings - Fork 0
Polars Engine
Syed Ibrahim Omer edited this page Apr 13, 2026
·
1 revision
The CLI passes engine from -e / --engine into calculate_indicators, which ends up in:
df.collect(engine=engine)engine selects Polars’ execution backend when collecting the lazy plan into a materialized DataFrame:
-
cpu(default): standard CPU execution. -
gpu: GPU execution when the Polars build and environment support it.
GPU collection can fail if:
- Polars is not built with GPU support, or
- Drivers / CUDA stack are missing or incompatible.
Profiling and tests may skip GPU scenarios when GPU execution is unavailable (see profiling records with status: skipped).
The main indicator pipeline is expressed on a LazyFrame and collected once per ticker package. Other code paths (e.g. some test helpers) may use different Polars APIs; this page refers to the main CLI path in calculate_indicators.
Useful when:
- Large frames and heavy rolling/EWM work dominate, and
- Your environment supports Polars GPU collect reliably.
For repeatable benchmarks, prefer cached profiling (deterministic fixture) over live Yahoo data.
Related pages:
- Getting Started
- CLI Reference
- Configuration & Templates
- Indicators (Overview)
- Output Formats
- Advanced Usage
- Troubleshooting
- Pipeline
- CLI Parsing
- Data Source (Yahoo Finance)
- Source Data Deep Dive
- Schema Normalization
- Data Shape Invariants
- Output Writing
- Write Output Deep Dive
- Config Resolution
- Polars Engine
- Source Modules
- Testing
- Performance
- Indicators Engine
- Reproducibility