Examples Guide (Production Usage)
What you will find here
A practical guide for all examples/*.py scripts with:
- what each script demonstrates,
- exact run commands,
- which dashboard flow to use,
- smoke commands for fast verification.
1) Classification showcase
Script:
examples/classification/showcase_stl10.py
What it demonstrates:
- iterative augmentation selection,
- XAI-driven candidates (ICD/AICD),
- full live dashboard flow.
Full showcase
python3 examples/classification/showcase_stl10.py --with-dashboardFast smoke (CI/dev machine)
python3 examples/classification/showcase_stl10.py \
--without-dashboard --no-dashboard-auto-open \
--max-train-samples 32 --max-val-samples 16 --batch-size 16 \
--m-epochs 1 --decisions 12) Multi-label showcase
Script:
examples/multilabel/multilabel_demo.py
What it demonstrates:
- multi-label pipeline (
task="multilabel"), - F1-samples oriented selection,
- dashboard-compatible events and artifacts.
Full demo
python3 examples/multilabel/multilabel_demo.py --with-dashboardFast smoke
python3 examples/multilabel/multilabel_demo.py \
--without-dashboard --no-dashboard-auto-open \
--n-train 64 --n-val 32 --batch-size 16 --m-epochs 1 --decisions 13) Detection VOC showcase
Script:
examples/detection/showcase_voc.py
What it demonstrates:
- detection branch-selection loop,
- bbox-aware augmentations,
- detection metrics (
map_50,map_50_95), - detection dashboard integration.
Full showcase
python3 examples/detection/showcase_voc.py --with-dashboardFast smoke (baseline-only completion)
python3 examples/detection/showcase_voc.py \
--without-dashboard --no-dashboard-auto-open \
--max-train-samples 4 --max-val-samples 2 --batch-size 1 \
--m-epochs 1 --decisions 0 --target-size 1284) Detection YOLO showcase
Script:
examples/detection/showcase_yolo_coco128.py
What it demonstrates:
- YOLO
data.yamlingestion, - detection augmentations + ICD/AICD,
- dashboard-compatible detection run artifacts.
Important:
--data-pathmust point to YOLOdata.yaml(not BNNR config YAML).
Full showcase
python3 examples/detection/showcase_yolo_coco128.py \
--data-path data/coco128/data.yaml --with-dashboardFast smoke
python3 examples/detection/showcase_yolo_coco128.py \
--without-dashboard --no-dashboard-auto-open \
--data-path /tmp/b11_tiny_yolo/data.yaml \
--batch-size 2 --max-train-samples 8 --max-val-samples 4 --quick5) Dashboard workflow for examples
For any example with --with-dashboard:
- Start script.
- Open Local URL on desktop.
- Scan QR for mobile view.
- Validate branch tree, KPI cards, samples/XAI sections.
- Stop server with
Ctrl+Cafter checks.
For offline sharing:
python3 -m bnnr dashboard export --run-dir <run_dir> --out exported_dashboard6) Example artifacts you should always verify
After each example run, verify:
report.jsonexists,events.jsonlexists,- metrics are present for task type,
- dashboard replay works (
bnnr dashboard serve --run-dir ...).