Visual Demo Architecture
The visual demo turns ACN from a backend-first research platform into a leadership-friendly demonstration: watch the neural network learn, fail, recover, adapt and improve.
This is a demo layer, not a new distributed training architecture.
Demo Story
Section titled “Demo Story”The viewer sees:
- current epoch, stage, branch and checkpoint;
- live loss, accuracy and learning-rate curves;
- validation images with predicted class, confidence and correctness;
- checkpoint timeline;
- adaptive event feed;
- AUTO/MANUAL mode;
- manual approve/reject for rollback;
- upload-based final inference against the current model.
Runtime Components
Section titled “Runtime Components”Backend
Section titled “Backend”Location:
packages/acn/src/acn/experiments/visual_demo.pyapps/api/src/acn_api/visual_demo.py
The backend owns a single local VisualDemoSession.
It provides:
GET /api/v1/demo/stateGET /api/v1/demo/eventsPOST /api/v1/demo/startPOST /api/v1/demo/pausePOST /api/v1/demo/resumePOST /api/v1/demo/rollbackPOST /api/v1/demo/auto-modePOST /api/v1/demo/approvePOST /api/v1/demo/rejectPOST /api/v1/demo/predict
The demo intentionally uses SSE instead of Redis. A single local browser observing a single local training session does not justify a queue or event bus.
Dataset
Section titled “Dataset”The demo uses lightweight generated visual samples:
airplaneship
This keeps the demo reliable without dataset downloads while still being visually understandable. The model is a real small CNN trained with PyTorch; metrics and predictions come from the actual model state.
Adaptive Behavior
Section titled “Adaptive Behavior”At the configured degradation stage the demo intentionally applies:
- a learning-rate spike;
- label inversion;
- noisy inputs.
The UI then shows:
- validation degradation;
- controller detection;
- rollback event;
- checkpoint restoration;
- learning-rate reduction;
- recovery training.
Manual mode pauses before rollback and waits for approve/reject. Auto mode executes rollback without operator approval.
Frontend
Section titled “Frontend”Location:
apps/web/src/views/VisualTrainingDemoView.tsxapps/web/src/hooks/useVisualDemo.tsapps/web/src/api/visualDemoApi.tsapps/web/src/types/visualDemo.ts
The visual demo is the first navigation item in the dashboard.
Demo Operation
Section titled “Demo Operation”Run API:
make apiRun frontend:
make webOpen:
http://localhost:5173Then open Live Demo and press Start.
Boundaries
Section titled “Boundaries”- No Kubernetes, Kafka, Celery, Ray or distributed scheduler.
- No Redis requirement for the demo.
- No MinIO requirement for the demo.
- No MLflow requirement for the demo.
- Checkpoints are in-memory because this is a presentation loop; durable artifact lifecycle remains covered by the core ACN artifact system and real vertical slice.
The demo exists to make ACN understandable. Production artifact persistence, PostgreSQL history and MLflow run comparison remain separate platform concerns.