Spaces:
Sleeping
Sleeping
Commit History
-
0.7.6: Qwen2.5-1.5B + shorter max_new_tokens + single-pass debugβ
Live T4 first-call latency was 55s on Qwen2.5-3B, which kills the demo. Switch to Qwen2.5-1.5B-Instruct (half the params, ~3x faster) and drop max_new_tokens from 384 to 200 β the MEAT JSON is ~80 tokens so 200 leaves comfortable headroom without letting the model ramble. Also fixed the /api/debug/pipeline endpoint: it was invoking the LLM TWICE per candidate (once for raw trace, once via pipeline.meat_extractor). On a slow first-call that meant >2min response. Now one LLM pass, and the debug response shows both the raw LLM output (with is_substring flag so we can see exactly which quotes got paraphrased) and the kept-after- substring-filter list. Dockerfile ENV updated to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>6008810 -
0.7.5: Debug endpoint shows raw LLM quotes + is_substring flagβ
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>207c2bb -
0.7.2: Debug endpoint reports extractor chain + LLM try_extract resultβ
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>d252dab -
Milestone 0.7.0: LLM MEAT extractor (Qwen/Qwen2.5-3B-Instruct + T4)β
Replaces the rule-based MEAT matcher (which couldn't follow implicit references like "Continue metformin" β TREAT-for-DM) with a small instruction-tuned LLM producing structured JSON. Component I's byte-exact substring guarantee still enforces faithfulness downstream. New - app/pipeline/components/f_meat_llm.py::LLMMEATExtractor * Lazy transformers import; CPU-only installs unaffected. * Chat-formatted prompt asking for {"M","E","A","T"} with verbatim quotes or null. * Balanced-JSON parser over the model output. * try_extract() returns None when unavailable / empty list when the LLM saw no MEAT β Composite uses the distinction. Changed - f_meat.py adds CompositeMEATExtractor and a HCC_MEAT_EXTRACTOR_BACKEND env selector. CompositeMEATExtractor only falls back to rule-based when the primary (LLM) is genuinely unavailable; empty LLM output is trusted ("LLM saw no MEAT") to avoid rule-based false positives. - app/api/server.py lifespan spawns a background thread foβ¦5eed8db -
0.6.8: /api/debug/pipeline for live MEAT-coverage diagnosisβ
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>42e3031 -
0.6.5: Fault-tolerant startup + route guards + /api/status errorsβ
If reference CSVs are missing, the pipeline fails to import, or gallery prewarm raises, the prior lifespan would crash uvicorn and HF would return a 502 with no diagnostic path. Now each of the three startup steps (pipeline build, gallery prime, metrics snapshot) is wrapped independently β failures are logged with full tracebacks and recorded to app.state.startup_errors. /api/status surfaces the error dict so the UI banner can show exactly which facet failed. Route guards: POST /api/code and POST /api/benchmark return 503 with a pointer to /api/status when the pipeline is None, instead of crashing on AttributeError. UI: ServerStatus interface gains optional startup_errors: Record<string, string>. Tests: test_api.py adds a positive assertion that /api/status reports "ok" with the local reference data. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>14a3550 -
0.6.4: /api/status diagnostic + StatusBanner + remove unused NotePanel propβ
Runtime diagnostic - GET /api/status returns pipeline_ready, reference_counts (hcc_labels + hcc_crosswalk_icd10), gallery_size, metrics_available. Status is "ok" if everything loaded, else "degraded" with the failing facets exposed. - ui/src/components/StatusBanner.tsx renders ONLY on degraded state β rose-colored, calls out which facet is missing, points at the HF build logs. Normal OK status stays silent to avoid banner competition with the amber research-demo disclaimer. - App.tsx fetches /api/status on load alongside gallery + metrics. Cleanup - NotePanel.Props no longer declares a `result: CodingResult | null` prop it never read. App stops passing it. Strict TS stays clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>d0ec498 -
Milestone 0.3.0: coder-voiced README, benchmark button, NER feature flag, CMS fetcherβ
README - Opening rewritten in coder vocabulary (suspect list / capture / MEAT / RADV risk / hierarchy trumping). Targets the S4 30-second recruiter skim. Benchmark endpoint + UI - POST /api/benchmark re-runs every gallery item live and returns min/median/p95/max/mean ms + per-case timings. Surfaces the S2 target (8000 ms p95 on CPU free tier) explicitly. - MetricsTab now has a "Run gallery benchmark" button with a red/green p95 card and a collapsible per-case breakdown. NER backend feature flag - New TransformersNER wrapper around the HF token-classification pipeline with lazy import + label normalization onto SpanType. - default_ner() reads HCC_MEAT_NER_BACKEND (dictionary|transformers) and HCC_MEAT_NER_MODEL (default blaze999/Medical-NER). - test_ner_backend_selection.py asserts selector behavior without importing transformers when the env var is unset β keeps CI lean. CMS fetcher - scripts/fetch_cms_hcc_v28.py now has two subcommands: inspect β download the CMS β¦e43bca6 -
Milestone 0.2.0: metrics tabs, TF-IDF linker, 25-case fixture, Synthea scaffoldβ
UI - Add Metrics / Calibration / Subgroups / About tabs alongside the existing three-panel Coding view. - Wire a TabBar so switching tabs doesn't rerun the pipeline. API - New GET /api/metrics returning a snapshot computed against the regression fixture at startup. Shape is frozen for the UI contract. Pipeline - New TFIDFLinker β sklearn char-ngram TF-IDF over ICD-10 descriptions with an alias fast-path and exact-description shortcut. Now the default; the prior ExactMatchLinker stays available for lean runs. - Introduce a Linker Protocol in d_linker and drop the concrete dep on ExactMatchLinker from the orchestrator. Fixtures - Expand regression_suite.json from 10 β 25 cases: paroxysmal AF, unstable angina, hepatitis-C + cirrhosis trumping, PVD, COPD exacerbation, lowercase + typo'd notes, resolved acute, three-level kidney hierarchy, rare HCC-48, systolic-CHF specificity, pulmonary fibrosis, hypothetical workup, long multi-specialty prose, and an empty-note edge cβ¦cd5b31c -
Initial scaffold: HCC-MEAT Coder v0.1.0β
End-to-end runnable pipeline with rule-based baselines in place of ML components, a FastAPI backend serving a React three-panel UI, and a 10-case regression suite guarding the invariants from AGENT_BRIEF.md Β§3 (faithfulness, negation/family-history filtering, hierarchy trumping, transparent risk). Deterministic components (real, tested): - E β HCC crosswalk + trumping over CMS-HCC v28 seed tables - H β over-coding (RADV) risk heuristic with named components + reasons - I β faithfulness verifier (substring guarantee + NLI hook) Baseline / swappable components: - A segmenter, B dictionary NER, C negation, D exact/alias linker, F rule-based MEAT extractor, G identity calibrator Infra: uv-driven pyproject, ruff + pytest + pre-commit, GH Actions CI for Python and UI, multi-stage Dockerfile for the HF Docker Space, typer CLIs for pipeline (`hcc-meat`) and evaluation (`hcc-meat-eval`). Reference data in data/reference/ uses PLACEHOLDER RAF weights; hydrate via scripts/fetch_cms_hcc_v28.β¦c6cfe5f