CLI Reference
After installing epftoolbox2, an epf command is available on your PATH.
pip install epftoolbox2epf --helpInteractive Mode
Running epf with no arguments launches a wizard-style interactive terminal where you can build and run pipelines without writing any YAML.
epfYou’ll see a menu with arrow-key navigation:
Run experiment from YAML Run data pipeline from YAML → CSV Run model pipeline from YAML ────────────────────────────────── Build & run data pipeline interactively Build & run model pipeline interactively ────────────────────────────────── ExitBuild & run data pipeline interactively walks you through:
- Adding sources (EntsoeSource, OpenMeteoSource, CsvSource, CalendarSource, EpftoolboxBenchmarkSource) with prompted config
- Adding transformers (optional)
- Adding validators (optional)
- Setting date range and caching
- Choosing an output CSV path
- Saving a reusable
data_pipeline.yaml - Running immediately
Build & run model pipeline interactively walks you through:
- Loading an input CSV (from a previous data run, with a prompt for the time zone if the file doesn’t name it)
- Adding models: available columns are shown as a checkbox list for predictor selection
- Adding evaluators and exporters
- Setting the test period, target column, horizon and resolution (
1hor15min) - Saving a reusable
model_pipeline.yaml - Running immediately
epf run: Full workflow
Run a complete experiment from a Workflow YAML.
epf run experiment.yamlOptions:
| Flag | Description |
|---|---|
--model-index N | Run only models[N] (array mode: needs model_pipeline.save_dir, see epf report) |
--processes N | Override max_processes |
--threads N | Override threads_per_process |
--dry-run | Build both pipelines without executing, validates config |
Examples:
# Basic runepf run experiment.yaml
epf run experiment.yaml --model-index 2
# Validate config without runningepf run experiment.yaml --dry-runepf report: Merge array results
After a SLURM array in which each task ran one model (--model-index), merge every model’s JSONL from model_pipeline.save_dir and run the evaluators and exporters once. Prints planned vs produced forecasts per model.
epf report experiment.yamlepf report experiment.yaml --allow-missing # report the models that have resultsWithout --allow-missing it fails if any model has no results file.
epf data: Data pipeline only
Run a DataPipeline YAML and save the result as a CSV.
epf data data_pipeline.yaml --start 2022-01-01 --end 2024-01-01 --output data.csvThe CSV keeps the local time zone: the index header names it (e.g. datetime[Europe/Warsaw]), and epf model and the interactive mode read the data back in that zone, so days and hours match an in-process run.
Required flags:
| Flag | Description |
|---|---|
--start DATE | Fetch start date (YYYY-MM-DD) |
--end DATE | Fetch end date (YYYY-MM-DD) |
--output FILE | Output CSV path |
Optional flags:
| Flag | Description |
|---|---|
--cache PATH | Cache directory or CSV file for source data |
Example:
epf data data_pipeline.yaml \ --start 2020-01-01 \ --end 2024-01-01 \ --output data.csv \ --cache .cache/epf model: Model pipeline only
Run a ModelPipeline YAML on an existing CSV dataset (e.g. produced by epf data). The model’s days and hours are local, so the file must say which time zone it is in: files from epf data do. For other files with UTC offsets in the timestamps, pass --tz.
epf model model_pipeline.yaml \ --data data.csv \ --test-start 2023-01-01 \ --test-end 2024-01-01Required flags:
| Flag | Description |
|---|---|
--data FILE | Input CSV file |
--test-start DATE | Test period start |
--test-end DATE | Test period end |
Optional flags:
| Flag | Description |
|---|---|
--target COL | Target column name (default: price) |
--horizon N | Forecast horizon in days (default: 7) |
--freq {1h,15min} | Data resolution: one model per hour or per quarter-hour (default: 1h). Must match the data |
--tz ZONE | Local time zone of the data (e.g. Europe/Warsaw). Overrides the zone named in the file |
--issue-time HH:MM | Check every predictor against this issue time before fitting (information set). Overrides the YAML’s information_set, or adds one if it has none |
--issue-timezone ZONE | Zone of --issue-time (default: the YAML’s, else Europe/Brussels). Without --issue-time, the YAML’s issue time is kept, or 11:45 if the YAML has no information_set |
--save-dir DIR | Save per-model prediction JSONL files to this directory |
--forecast-only | Skip evaluators and exporters |
--allow-manifest-mismatch | Resume even if --save-dir’s manifest disagrees with this run’s configuration (overwrites it) |
--require-manifest | Refuse to resume from a --save-dir that has results but no manifest, instead of warning |
epf validate: Validate any pipeline YAML
Load and parse a YAML file, instantiate all components, and report errors. Without running anything.
epf validate data_pipeline.yamlepf validate model_pipeline.yamlepf validate experiment.yamlThe file type is auto-detected from its top-level keys. Exits with code 1 if validation fails.
epf init: Scaffold template files
Create experiment.yaml, data_pipeline.yaml, and model_pipeline.yaml with placeholder values in the current directory.
epf initepf init --force # overwrite existing files