Adaptive Core Network is a modular monolith for versioned, reversible and traceable neural training workflows. The current platform is a local research system targeted at a single workstation with Python 3.12, PyTorch, FastAPI, PostgreSQL-compatible repositories, Docker Compose services and a React dashboard.
ACN currently supports:
- PyTorch trainer core with checkpointing, mixed precision, optimizers and schedulers;
- local artifact lifecycle with checksum-validated checkpoint save/load;
- Git-like training versioning with commits, branches, rollback and commit graph records;
- Citadel safety checks for critical actions;
- rule-based adaptive controller as the stable local decision path;
- experimental neural controller with rule-based fallback;
- continual-learning abstractions, replay buffer and forgetting/retention metrics;
- synchronous orchestration for Stage 1 local execution;
- real Fashion-MNIST vertical slice with checkpoint restoration and dashboard telemetry;
- React dashboard with REST snapshot plus SSE/WebSocket update contracts;
- presentation-first live visual demo for airplane-vs-ship adaptive training.
Run the API and frontend:
make api
make webOpen the frontend and choose Live Demo:
http://localhost:5173
Press Start.
The demo shows a small CNN learning a visually understandable airplane-vs-ship task. During the run it displays live loss/accuracy/LR charts, validation image predictions, checkpoint timeline, adaptive event feed, rollback count, current branch/checkpoint and GPU memory if CUDA is available.
Use AUTO for fully automatic rollback. Toggle to MANUAL to pause before critical rollback and
approve or reject the controller action. After training, upload an image in the final inference
panel to run prediction against the current model checkpoint.
The guided presentation script is in docs/28_guided_demo_script.md. The post-training
inference showcase is documented in docs/29_inference_showcase.md.
For a full infrastructure-backed demo, use Docker Compose:
cp .env.example .env
make compose-upThen open:
- Dashboard: http://localhost:5173
- MLflow: http://localhost:5000
- MinIO: http://localhost:9001
- Runtime health: http://localhost:8000/api/v1/runtime/health
With ACN_RUNTIME_STACK_ENABLED=true, the live demo persists commits, checkpoints, decisions and
rollback events to PostgreSQL, stores checkpoint artifacts in MinIO and logs metrics/artifacts to
MLflow. See docs/27_runtime_stack.md.
The current visual demo intentionally uses a fixed quick-run preset:
- dataset: generated labeled airplane-vs-ship images;
- model: small CNN suitable for RTX 3060 laptop demos;
- adaptive scenario: intentional learning-rate spike, degradation detection, rollback and recovery.
For custom datasets, the expected intake model is class-folder labeling:
dataset/
train/
ship/*.png
airplane/*.png
val/
ship/*.png
airplane/*.png
The UI now shows this flow as Experiment setup. Full custom dataset upload/model selection is
not wired as a production workflow yet; the demo preset exists to make the adaptive loop reliable
and visually understandable for a 5-minute presentation.
- Python 3.12
- Node.js 20+
- Docker Compose v2
- Optional CUDA-capable PyTorch environment for GPU runs
On Debian or Ubuntu, install python3.12-venv if python3.12 -m venv is unavailable.
cp .env.example .env
python3.12 -m venv .venv
source .venv/bin/activate
make installRun quality gates:
make lint
make type-check
make testRun the first real end-to-end adaptive continual-learning milestone:
make real-vertical-sliceThis runs:
- Fashion-MNIST baseline training.
- Checkpoint artifact save.
- Version commit on
main. - Intentional degraded stage with learning-rate spike and corrupted samples.
- Real metric evaluation.
- Rule-based degradation detection.
- Citadel-protected rollback.
- Real checkpoint restoration.
- Continued recovery training.
- Dashboard telemetry/report generation.
Default outputs are written to:
experiments/acn-real-fashion-mnist-rollback/
Important generated files:
dashboard_snapshot.jsonmetrics.jsonrollback_events.jsonreport.mdrollback_report.mdvalidation_plot.svgforgetting_plot.svgadaptation_plot.svgexperiment.dbartifacts/checkpoints/...
After running make real-vertical-slice, expose that telemetry through the API:
export ACN_DASHBOARD_TELEMETRY_PATH=experiments/acn-real-fashion-mnist-rollback/dashboard_snapshot.json
make apiIn another terminal:
make webOpen:
- Frontend: http://localhost:5173
- API health: http://localhost:8000/health
- Dashboard snapshot: http://localhost:8000/api/v1/dashboard/snapshot
- SSE stream: http://localhost:8000/api/v1/dashboard/events
If the frontend cannot reach the API, set:
export VITE_API_BASE_URL=http://localhost:8000from inside apps/web before running npm run dev, or keep the default local setup.
The API allows local Vite origins such as http://localhost:5173 and http://localhost:5176
through ACN_CORS_ALLOW_ORIGIN_REGEX.
Start local infrastructure and app services:
make compose-upEndpoints:
- API: http://localhost:8000
- Frontend: http://localhost:5173
- MLflow: http://localhost:5000
- MinIO console: http://localhost:9001
Stop:
make compose-downTrainer example:
make train-fashion-mnistRule-based controller simulation:
make simulate-controllerCitadel simulation:
make simulate-citadelContinual-learning scenario demo:
make demo-continual-fashionSynchronous orchestration lifecycle example:
make demo-orchestrationSynthetic deterministic E2E utility:
make e2e-experimentSynthetic research benchmark utility:
make research-benchmarkPresentation demo mode:
make demo-modeacn.trainingmust not import API/UI/orchestration managers.acn.orchestrationcoordinates domains and must not own PyTorch training implementation.acn.versioningowns commits, branches and checkpoint metadata only.acn.artifactsowns checkpoint artifact persistence.acn.experiments.real_verticalis a milestone script that composes core modules.acn.experiments.e2eandacn.experiments.researchare synthetic utilities, not empirical ML benchmarks.acn.controller.neuralis experimental until trained and calibrated on real policy data.
Architecture guardrails live in tests/architecture/test_architecture_guardrails.py.
Quality gates:
make lint
make type-check
make test
make coveragePython uses Ruff, Black and strict MyPy. Frontend uses TypeScript, Tailwind, React Flow and Recharts. Generated datasets, checkpoints, experiment outputs, coverage reports and local databases are ignored by git.