A markdown-driven visualization tool for explaining agentic AI pipeline behavior.
This project is a scenario player/visualizer (not a physics-accurate simulator). You manually define stages, events, and hardware behavior in a markdown file, then generate:
metrics_output.json(time-series data)pipeline_dashboard.html(interactive playback dashboard)
A short preview of the full dashboard playback:
- Pipeline stages and transitions over time
- Global clock and elapsed playback time
- CPU, GPU, memory, disk, and network trends
- CPU multicore/caches and multi-GPU details
- Event overlays with IDs/names, including parallel events
- Resource-relevant event strips in CPU/GPU panels
pipeline_demo.py: parser + data generator + dashboard data injectorpipeline_config.md: input scenario definitionmetrics_output.json: generated metrics outputpipeline_dashboard.html: generated visual dashboard
Prerequisite: Python 3
Run from repo root:
PYTHONDONTWRITEBYTECODE=1 python3 pipeline_demo.py \
--config pipeline_config.md \
--metrics-out metrics_output.json \
--dashboard pipeline_dashboard.htmlThen open pipeline_dashboard.html in a browser.
pipeline_config.md has three sections:
## Global: sample interval, clock start, hardware counts## Stages: pipeline phase timeline and baseline resource behavior## Events: overlays that can run serially or in parallel
You can define stages/events in c-struct-like rows:
{ id: inference, name: Inference, start: 4.0, end: 10.5, cpu: on, gpu: gradual_increase }Each stage/event supports any of:
start+endstart+durationend+duration
Events are active by time overlap and appear in active_event_ids.
Supported behavior values:
offongradual_increasegradual_decrease
Per-resource intensity:
cpu_level,gpu_level,mem_level,disk_level,network_level- Range:
0.0to1.0
Use resource_target to declare event intent directly in each event row:
cpugpucpu_gpunoneauto(default)
Example:
{ event_id: E100, name: CPU Burst, start: 2.0, duration: 1.0, resource_target: cpu, cpu: on }
{ event_id: E101, name: GPU Warmup, start: 4.0, duration: 1.2, resource_target: gpu, gpu: gradual_increase }
{ event_id: E102, name: Joint Compute, start: 5.0, duration: 2.0, resource_target: cpu_gpu, cpu: on, gpu: on }If cpu or gpu is explicitly set in the row, that explicit value overrides the resource_target default.
For stages and events:
cpu_load_mode: uniform|customgpu_load_mode: uniform|custom
Custom distributions:
cpu_core_loads: <comma-separated list>gpu_device_loads: <comma-separated list>
Rules:
- In
custommode, you must provide values for all declared cores/devices. - Values are normalized into weights automatically.
- Edit
pipeline_config.mdfor your scenario. - Regenerate JSON + dashboard with
pipeline_demo.py. - Open
pipeline_dashboard.htmland play the flow. - Use stage timeline, event strips, and CPU/GPU detail toggles for explanation.
- This tool is designed for explainability and visualization.
- Output values are synthetic but deterministic enough for storytelling (seeded/noise-smoothed generation).
