MLOPS / PERSONAL PROJECT
MED-RAG Serving Lab
I implemented version locking, quality gates, request controls and release checks. Select a module for its implementation and code, or an event below for its recorded result.
cpu-91fe7e3fc879Windows · Python 3.12.14 · 2026.09.14Pin the complete execution context
Model and tokenizer revisions, image digests, and prompt, data and runtime hashes share one manifest. Changed inputs cannot pass as the same candidate.
Reject invented citations and over-refusal
Failures from MED-RAG informed synthetic regression checks for sources, direct quotations, expected facts and answerability. Compare the good and defective responses below.
Recheck raw evidence before packaging
The release gate recomputes results from responses and raw records instead of trusting a saved pass flag. Passing candidates are prepared under the manifest hash without overwriting existing artifacts.
Bound admission and streaming lifetime
Implemented admission limits, readiness and manifest identity, SSE forwarding, deadlines and connection cleanup. The real gateway was exercised against a local scripted upstream for 429, 503, 504 and interrupted streams.
Make the verification reproducible
Two isolated CPU servers run on temporary ports, exercise failure and recovery, and then stop. Request counters, event order and source hashes are captured as JSON and Prometheus text and repeated in CI.
Real loopback HTTP + fixed synthetic replies.
No model calls or GPU performance measurements.
02 / QUALITY & RELEASE
Candidate comparison
Twelve synthetic questions and fixed answers exercise the checks. Select a cell to inspect its question, answer and failure reasons.
Fixed replies passing the contract
Mechanical contract checks, not model accuracy.
s01PASS가상 라온센터 자료실 운영 시간은?
RESPONSE UNDER TEST자료실은 평일 09:00부터 17:00까지 운영합니다. [library.md]
View source context
library.md: 가상 라온센터 자료실은 평일 09:00부터 17:00까지 운영한다.
Separate tampering check: an edited summary was blocked before artifact creation.
03 / HTTP REHEARSAL
Requests and injected faults
Ten requests went through the real gateway. Four occupied slots triggered a capacity rejection; upstream errors, a truncated stream and a deadline were injected before checking recovery.
Normal request
Received a complete SSE response and verified its end marker and manifest identity.
{
"id": "normal",
"stage": "gateway",
"at_ms": 13.46,
"http_status": 200,
"ok": true,
"error": null,
"identity_matches": true,
"expected": {
"http_status": 200,
"ok": true,
"identity_matches": true
},
"passed": true
}T+ marks event order in the run, not model latency or recovery performance.
04 / REPRODUCE
Code and evidence
Python 3.11+ · no extra packages
cd med-rag-serving
python -m unittest discover -s tests -v
python -m serving_lab rehearsal --out artifacts/my-runChoose a new output folder. The local servers stop after verification.
Verified source versions SHA-256
0a9e0f7397d0932e…0fc8212e735cdf69…e60bc77db12fb913…73fbbec8d902e8c3…56d798da1a9e73f5…38c083130bf88080…Normalized source hashes · full values in the raw JSON
Verified in this run
HTTP/SSE controls, admission limits, normal responses after fault removal, quality/tamper gates and /metrics counters.
Still requires measurement
GPU inference and model quality, throughput/latency improvements, Prometheus alert firing and live rollout/rollback.