Skip to content
Graphviz (DOT) templates

Nightly Training DAG (Graphviz)

A demand forecasting retraining DAG with a data-quality suite, time-series splits and a WAPE quality gate that pages the owner on failure.

Template previewGraphviz (DOT)
Rendering…

Make it your own.

digraph training_dag {
  rankdir=LR;
  graph [fontname="Inter", labelloc="t", label="Nightly training DAG - store demand forecasting"];
  node [fontname="Inter", shape=box, style="rounded,filled", fillcolor="#f5f3ff"];
  edge [fontname="Inter", fontsize=10];

  pos     [label="ingest_pos\n02:00, 41 stores"];
  weather [label="ingest_weather\nforecast grid"];
  promo   [label="ingest_promo\npromotion calendar"];
  checks  [label="data_quality_suite\n32 expectations", fillcolor="#fef9c3"];
  feats   [label="build_features\nlags, rolling means, holidays"];
  split   [label="time_series_split\n8 folds, 28 day horizon"];
  train   [label="train_gbm\n40 hyperparameter trials"];
  evalu   [label="evaluate\nWAPE, bias, per store"];
  gate    [label="quality_gate\nWAPE at or below 0.18", shape=diamond, fillcolor="#e0f2fe"];
  reg     [label="register_model\nstage = staging"];
  back    [label="backfill_forecasts\nnext 28 days"];
  page    [label="page_the_model_owner", fillcolor="#fee2e2"];

  pos -> checks;
  weather -> checks;
  promo -> checks;
  checks -> feats;
  feats -> split;
  split -> train;
  train -> evalu;
  evalu -> gate;
  gate -> reg [label="pass"];
  gate -> page [label="fail"];
  reg -> back;
}