The Problem
Deploying a high‑performing code‑generation pipeline on a single consumer GPU normally requires fine‑tuning, paid API access, or complex cloud orchestration. Teams that need local, cost‑controlled execution must stitch together model inference, test‑case generation, and self‑repair without a ready‑made stack.
What This Does
ATLAS bundles a frozen 14 B quantised LLM with a constraint‑driven generation loop that iteratively produces, validates, and repairs code until it passes internally generated tests. The repo is a portfolio of six loosely coupled projects:
benchmark/– CLI driver (benchmark/cli.py) and dataset / model runners (benchmark/v3_runner.py,benchmark/models.py).rag‑api/– FastAPI‑style service exposing retrieval‑augmented generation (rag-api/main.py).atlas/– Core orchestration: a Flask dashboard (atlas/dashboard/app.py), a sandbox executor (atlas/sandbox/executor_server.py), and a task‑worker daemon (atlas/task-worker/worker.py).api‑portal/– Small Flask UI (api-portal/src/main.py) with auth and DB helpers.llm‑proxy/– Minimal proxy exposingchat_completions(llm-proxy/main.py).scripts/– Helper scripts for data preparation and CI‑adjacent tasks.
Key files: benchmark/cli.py (entry for experiments), atlas/task-worker/worker.py (background job runner), rag-api/main.py (service entry), api-portal/src/main.py (web UI entry).
How It Is Wired
Execution starts at one of the documented entry points:
benchmark/cli.py::main(line 474) – the primary benchmark driver.atlas/task-worker/worker.py::run(line 42) – launches the autonomous task‑worker daemon.llm-proxy/main.py::chat_completions– handles incoming LLM chat requests.rag-api/main.py::sync_project– syncs a project definition to the RAG store.
From each entry the call graph fans out:
| Entry | Reach | Notable hubs | External effect |
|---|---|---|---|
benchmark/cli.py::main | 287 functions | MockLLM (99 callers), ReplayBuffer (48) | Writes JSON results (atomic_write_json → filesystem) and updates Redis (db.from_url). |
atlas/task-worker/worker.py::run | 212 functions | to_dict (46 callers), solve (37) | Persists task status (atomic_write_json), may invoke external commands (subprocess via run_check_cycle). |
llm-proxy/main.py::chat_completions | 72 functions | log (26 callers) | Rate‑limit check uses hashlib.sha256 (crypto) and logs to file. |
rag-api/main.py::sync_project | 71 functions | generate_project_id (crypto) | Calls client.post (outbound network) to store embeddings. |
The largest blast‑radius module is benchmark/models.py, imported by 19 other modules; any change here risks widespread breakage. benchmark/v3_runner.py and v3_ablation_runner.py are oversized (≈1 200 lines each) and host many of the above calls, making them hot spots for refactoring.
Data flow examples:
run → log(47 occurrences) records task progress.run → atomic_write_jsoncreates a JSONL file under the repo’sresults/directory.chat_completions → check_rate_limithashes the API key, then proceeds toclient.postfor LLM inference.sync_project → generate_project_idhashes project content, thenclient.poststores embedding vectors.
External touch points (aggregated across the repo): 70 outbound network calls, 66 filesystem writes, 37 external command executions, and 2 model inference calls.
How To Use It
# Clone the repo
git clone https://github.com/moses-y/ATLAS
cd ATLAS
# Install Python deps for the component you need
# Example: benchmark driver
pip install -r benchmark/requirements.txt # (requirements file inferred from top‑level)
# Example: API portal container build
docker build -t atlas-api-portal -f api-portal/Dockerfile .
Configuration files:
api-portal/src/config.py– expects environment variables for DB URL (DATABASE_URL) and JWT secret (SECRET_KEY).atlas/dashboard/app.py– readsatlas.conf.example; copy toatlas.confand adjustmodel_path,gpu_id.rag-api/main.py– requires a vector‑store endpoint atRAG_ENDPOINT.
Running a component:
# Benchmark CLI (default dataset)
python -m benchmark.cli --config benchmark/config.py
# Start the task‑worker daemon
python -m atlas.task-worker.worker
# Launch the API portal (Flask)
python -m api-portal.src.main
If you prefer containers, build each Dockerfile (api-portal/Dockerfile, atlas/dashboard/Dockerfile, etc.) and run the resulting images, supplying the same env vars.
Real‑World Use
A data‑science team can spin up a single‑GPU node, run benchmark/cli.py to evaluate code‑generation on their internal test suite, and then deploy atlas/task-worker/worker.py as a background service that continuously processes incoming code requests, self‑repairing failures without ever sending data to external APIs.
from atlas.task_worker import worker
worker.run() # daemon monitors a Redis queue, pulls tasks, writes results locally
Code Health & Issues
- High – lockfile missing –
pyproject.tomlhas no lockfile. - High – no CI workflow – 150 source files, no
.github/workflows. - High – no build gate for Docker artifact –
api-portal/Dockerfileis never built by CI. - Medium – enable Dependabot – 5 manifests, no update bot.
- Medium – pin base image –
api-portal/Dockerfileuses mutablepython:3.11-slim. - Medium – large binary in repo –
rag-api/geometric_lens/gate_embeddings.json(6 MB). - Medium – run container as non‑root –
api-portal/Dockerfilelacks aUSERdirective.
Additional observations: tests exist (tests/), licence file is present, but no lockfile and no CI/CD pipeline. Dockerfiles are provided for several services, but container security hardening is incomplete.
The Bottom Line
ATLAS delivers a reproducible, self‑hosted code‑generation pipeline with impressive benchmark scores, but the codebase is fragmented, contains several high‑impact hotspots, and lacks essential production safeguards (lockfiles, CI, hardened containers). It is suitable for research teams comfortable navigating deep nesting and adding their own CI/CD scaffolding; production deployments will require refactoring of oversized modules and implementation of the missing DevOps practices.