Skip to content

feat: runnable deployment examples (Dagster, Airflow, Celery)#943

Open
egordm wants to merge 3 commits into
mainfrom
docs/deployment-examples
Open

feat: runnable deployment examples (Dagster, Airflow, Celery)#943
egordm wants to merge 3 commits into
mainfrom
docs/deployment-examples

Conversation

@egordm
Copy link
Copy Markdown
Collaborator

@egordm egordm commented Jun 2, 2026

What

Adds examples/deployment/ — self-contained, runnable examples for deploying OpenSTEF on three orchestrators, implementing the patterns from the deployment guide:

  • Dagster & Airflow — DAG-based orchestration (separate train/predict steps)
  • Celery — worker based execution

They simulate data integration with the Liander 2024 benchmark dataset, so they run with no external infrastructure, and demonstrate the production-correct cross-process model handoff via a self-contained, SQLite-backed local MLflow store.

Structure

  • common/ — one Settings (pydantic-settings) embedding OpenSTEF's ForecastingWorkflowConfig; mocked external systems (services.py: metering, weather, publish) speaking OpenSTEF's TimeSeriesDataset/ForecastDataset; and the real pipeline glue (pipeline.py).
  • dagster_app/ — three partitioned assets (input_datatrained_modelforecast), one partition per target, with the built-in IO manager between assets and MLflow for the model handoff. UI via dagster dev, CLI via run.py.
  • airflow_app/ — TaskFlow train/forecast DAGs with dynamic task mapping.
  • celery_app/ — eager train/forecast CLI plus a real worker on a filesystem broker (no Redis) and the Flower UI.

Every framework exposes the same commands: uv run poe deploy-<framework>-{ui,train,forecast}.

Library change

Adds an optional artifact_location to MLFlowStorage (passed to create_experiment), so a database tracking backend (e.g. sqlite:///...) can store artifacts at an explicit absolute location instead of MLflow's CWD-relative ./mlruns. Backward compatible (defaults to None), covered by a new unit test.

Wiring

uv workspace member; root ruff/pyright/pytest config; poe tasks co-located in the example's pyproject and pulled into root via [tool.poe] include.

Verified

All three apps run end-to-end (CLI + UI where applicable); lint, format, type (0 errors), lock, reuse, and tests all green.

@egordm egordm requested a review from a team June 2, 2026 15:01
@github-actions github-actions Bot added the chore Improvements or additions to documentation label Jun 2, 2026
egordm added 3 commits June 2, 2026 17:13
Add an optional artifact_location field to MLFlowStorage and pass it to
create_experiment. This lets experiments created against a database tracking
backend (e.g. sqlite:///...) store artifacts at an explicit absolute location
instead of MLflow's default CWD-relative ./mlruns, keeping a local setup
self-contained and cross-process loadable. Backward compatible (defaults to None).

Signed-off-by: Egor Dmitriev <egordmitriev2@gmail.com>
…elery)

Add examples/deployment: self-contained, runnable examples for the DAG-based
(Dagster, Airflow) and queued (Celery) deployment patterns. They simulate data
integration with the Liander benchmark dataset, so they run with no external
infrastructure, and demonstrate the production-correct cross-process model
handoff via a local SQLite-backed MLflow store.

- common/: shared pydantic-settings config, mocked external services
  (metering, weather, publish) speaking OpenSTEF types, and the pipeline glue.
- dagster_app/: three partitioned assets (input_data, trained_model, forecast),
  one partition per target, with a CLI entrypoint and the dagster dev UI.
- airflow_app/: TaskFlow train/forecast DAGs with dynamic task mapping.
- celery_app/: eager train/forecast CLI plus a real worker on a filesystem
  broker (no Redis) and the Flower UI.

Wire it into the uv workspace, root ruff/pyright/pytest config, and poe tasks
(deploy-<framework>-{ui,train,forecast}, included from the example's pyproject).

Signed-off-by: Egor Dmitriev <egordmitriev2@gmail.com>
Add a 'Runnable examples' admonition to the deployment guide pointing at the
new Dagster/Airflow/Celery examples, and list the deployment examples in the
examples README.

Signed-off-by: Egor Dmitriev <egordmitriev2@gmail.com>
@egordm egordm force-pushed the docs/deployment-examples branch from 46ee1c4 to b5b22df Compare June 2, 2026 15:14
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant