Skip to content

Commit ab7b53e

Browse files
authored
Merge pull request #1 from chendbox/codex-final-acceptance
docs: polish public release materials
2 parents f5ff792 + da4dbaa commit ab7b53e

4 files changed

Lines changed: 134 additions & 14 deletions

File tree

README.md

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ stateDiagram-v2
116116

117117
Authentication and tenant binding happen in middleware before route handlers. Tenant context comes from the verified token; database queries are filtered by `tenant_id` from `request.state.identity`, not from request bodies.
118118

119+
<!-- Screenshot slot: docs/images/console-overview.png -->
120+
<!-- ![Console overview](docs/images/console-overview.png) -->
121+
119122
## Why This Project Exists
120123

121124
The project demonstrates practical AI infrastructure design: lifecycle state, capacity control, scheduler/worker separation, lease-based recovery, resource accounting, multi-tenant authorization, observability, and productized developer workflows.
@@ -185,8 +188,9 @@ docker compose up -d --scale worker=4 app worker
185188

186189
The stack runs Postgres, the API in push-scheduler mode, and 4 worker containers. Each worker
187190
container starts multiple logical worker slots from `jobs.worker_concurrency`, so the console may
188-
show more ACTIVE worker slots than Docker containers. For example, 4 containers with concurrency 4
189-
produce 16 logical execution slots. The public compose file sets
191+
show more ACTIVE worker slots than Docker containers. These slots are logical execution capacity,
192+
not additional Docker worker containers. For example, 4 containers with concurrency 4 produce
193+
16 logical execution slots. The public compose file sets
190194
`WORKER_GPU_HEALTH_PROBE=0` because `gpu_demo` is a simulated GPU scheduling demo and should run
191195
without a local NVIDIA runtime.
192196

@@ -217,6 +221,9 @@ with `gpu_health_ok=true` only if `nvidia-smi -L` works inside the container. Th
217221
`python:3.11-slim`, so the public `gpu_demo` remains a scheduling simulation. Real PyTorch/CUDA execution
218222
requires a CUDA/PyTorch runtime image and matching dependencies.
219223

224+
<!-- Screenshot slot: docs/images/gpu-demo-result.png -->
225+
<!-- ![GPU demo result](docs/images/gpu-demo-result.png) -->
226+
220227
Useful URLs:
221228

222229
- Console: http://localhost:8001/console
@@ -327,6 +334,9 @@ curl -sS http://localhost:8001/v1/jobs/<job_id>
327334

328335
This demonstrates the worker lease/heartbeat/reclaim path: work is not permanently lost when an executor disappears. In a successful recovery run, the job first appears under the killed worker's `worker_uid`, then later appears under a different `worker_uid`, and finally reaches `state: "SUCCEEDED"`.
329336

337+
<!-- Screenshot slot: docs/images/job-detail-lease-recovery.png -->
338+
<!-- ![Lease recovery job detail](docs/images/job-detail-lease-recovery.png) -->
339+
330340
PowerShell notes:
331341

332342
- Use `Select-String` instead of `grep`: `docker compose logs worker | Select-String -Pattern "<worker_uid>"`.
@@ -408,16 +418,11 @@ Install test dependencies:
408418
pip install -e ".[test]"
409419
```
410420

411-
Run the public release gate used by CI:
421+
Run the backend test suite used by GitHub Actions:
412422

413423
```bash
414-
pytest tests/unit \
415-
tests/integration/test_health.py \
416-
tests/integration/test_auth_middleware.py \
417-
tests/integration/test_scoped_authorization.py \
418-
tests/integration/test_jobs.py \
419-
tests/integration/test_ui.py \
420-
-q
424+
pytest tests/unit -q
425+
pytest tests/integration -q
421426
```
422427

423428
Run only the unit tests:
@@ -426,20 +431,40 @@ Run only the unit tests:
426431
pytest tests/unit -q
427432
```
428433

429-
Run the curated integration smoke tests:
434+
Run a smaller local integration smoke set:
430435

431436
```bash
432437
pytest tests/integration/test_health.py tests/integration/test_auth_middleware.py tests/integration/test_scoped_authorization.py tests/integration/test_jobs.py tests/integration/test_ui.py -q
433438
```
434439

440+
Build the React console:
441+
442+
```bash
443+
cd src/app/ui-react
444+
npm install
445+
npm run build
446+
```
447+
448+
Run the same Docker Compose smoke path used by CI:
449+
450+
```bash
451+
docker compose up -d --build --scale worker=2
452+
curl -fsS http://localhost:8001/health/ready/full
453+
curl -fsS http://localhost:8001/ui
454+
docker compose down -v
455+
```
456+
435457
PowerShell equivalent:
436458

437459
```powershell
438460
.\.venv\Scripts\python.exe -m pip install -e ".[test]"
439-
.\.venv\Scripts\python.exe -m pytest tests\unit tests\integration\test_health.py tests\integration\test_auth_middleware.py tests\integration\test_scoped_authorization.py tests\integration\test_jobs.py tests\integration\test_ui.py -q
461+
.\.venv\Scripts\python.exe -m pytest tests\unit -q
462+
.\.venv\Scripts\python.exe -m pytest tests\integration -q
440463
```
441464

442-
The project includes unit and integration coverage for core state transitions, scheduler behavior, worker paths, artifact handling, auth boundaries, and UI/CLI behavior.
465+
The GitHub Actions pipeline currently runs three gates: Python + Postgres tests, React console build,
466+
and a Docker Compose smoke test. The project includes unit and integration coverage for core state
467+
transitions, scheduler behavior, worker paths, artifact handling, auth boundaries, and UI/CLI behavior.
443468

444469
## Repository Guide
445470

@@ -465,6 +490,8 @@ Runtime outputs such as `artifacts/`, `tmp/`, `logs/`, `reports/`, model files,
465490

466491
## Public Release Scope
467492

493+
See the current release draft in [docs/release-notes/v0.1.0.md](docs/release-notes/v0.1.0.md).
494+
468495
### Implemented MVP
469496

470497
- durable job and assignment lifecycle

docs/images/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

docs/release-notes/v0.1.0.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# MLIS v0.1.0
2+
3+
## Summary
4+
5+
MLIS v0.1.0 is the first public-release candidate of the Machine Learning
6+
Infrastructure Service. This release focuses on the platform layer around ML
7+
inference workloads: job submission, durable state, scheduler-driven placement,
8+
worker execution, artifact-backed payloads, tenant-scoped authorization, and
9+
lease-based recovery when workers fail.
10+
11+
The public release is intentionally local-first. The recommended demo path uses
12+
Docker Compose with Postgres, one API/control-plane process, and scalable
13+
worker/data-plane containers.
14+
15+
## What This Release Includes
16+
17+
- FastAPI control plane with `/v1/jobs` as the primary public API surface
18+
- Postgres-backed job and assignment state
19+
- Push scheduler and worker/data-plane separation
20+
- Worker registration, heartbeat, lease ownership, and reclaim-based recovery
21+
- Artifact-backed inputs and outputs
22+
- React operator console served by FastAPI
23+
- `mlis` CLI for local operator workflows
24+
- JWT-based auth, tenant binding, worker auth, and audit foundations
25+
- Simulated `gpu_demo` that exercises GPU-aware placement without requiring a
26+
physical NVIDIA GPU
27+
- CI gates for:
28+
- Python + Postgres tests
29+
- React console build
30+
- Docker Compose smoke startup
31+
32+
## Recommended Demo Path
33+
34+
The release is designed to be demonstrated through:
35+
36+
1. `docker compose up -d --scale worker=4`
37+
2. `/console` for operator visibility
38+
3. `sleep` jobs for queue and assignment behavior
39+
4. lease recovery by killing a worker mid-run
40+
5. `gpu_demo` for simulated GPU-aware scheduling
41+
42+
This path keeps the public story focused on the platform itself rather than on
43+
model quality or benchmark marketing.
44+
45+
## Intentionally Out of Scope
46+
47+
This release does not try to be:
48+
49+
- a training platform
50+
- a benchmark-optimized serving stack
51+
- a hosted SaaS product
52+
- an identity provider
53+
- a real CUDA execution demo by default
54+
55+
Optional integrations such as `tiny_llm` remain available as examples, but they
56+
are not the default public quickstart path.
57+
58+
## Key Validation Performed
59+
60+
Before release-candidate signoff, the project was validated through:
61+
62+
- local Docker Compose startup with API, Postgres, and multiple worker
63+
containers
64+
- successful `/health/ready/full` readiness checks
65+
- successful `/console` shell delivery
66+
- end-to-end `sleep` job execution
67+
- lease recovery by killing a worker during an active job and verifying
68+
reassignment plus eventual success
69+
- successful simulated `gpu_demo` execution with GPU placement signals such as
70+
`gpu_ids` and `cuda_visible_devices`
71+
- green GitHub Actions runs for backend tests, frontend build, and compose smoke
72+
73+
## Known Constraints
74+
75+
- The default Docker image is `python:3.11-slim`, so `gpu_demo` is a scheduling
76+
simulation, not a real CUDA compute workload.
77+
- The console may show more ACTIVE worker slots than Docker worker containers
78+
because each worker container can advertise multiple logical execution slots.
79+
- Advanced runtime panels and optional runners are present, but the public
80+
release emphasizes the core scheduler/worker/job lifecycle path.
81+
82+
## Release Positioning
83+
84+
This release is best read as:
85+
86+
- a local-first AI infrastructure platform demo
87+
- a design and systems project
88+
- a working reference for scheduler, worker, lease, auth, and observability
89+
boundaries
90+
91+
It is not positioned as a production-managed service offering or a finished ML
92+
product.

docs/validation/security_test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The examples below use PowerShell.
55
## 1. Start the service in warn mode
66

77
```powershell
8-
cd D:\Downloads\machine-learning-infrastructure-service\open-source-release
8+
cd path\to\machine-learning-infrastructure-service\open-source-release
99
1010
$env:PYTHONPATH="src"
1111
$env:ENABLE_POSTGRES="0"

0 commit comments

Comments
 (0)