Spaces:
Running
Running
Commit History
-
[ui] harvest -> examined wording, warn when meta > examined, fix Fill example values Running
- 입력 힌트/표 머리글: harvest -> examined (CSV 컬럼명 harv_* 는 유지) - meta > examined 인 station: 입력칸 강조 + 경고, 예측/배치 결과에 표시 - Fill example: 전이 station 이 meta < examined 가 되도록 (#3 4/10, #7 2/6, #8a 1/4) - fix: score_csv 에서 station 컬럼이 없는 CSV 가 AttributeError 로 실패하던 문제 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>8a84fa6
-
[feat] add 5-year RMST (restricted mean survival time)
patient_curve(): integrate patient-specific S(t) over 0..H months (trapezoidal) for a point RMST; 95% CI from per-bootstrap-replicate curve RMSTs (2.5/97.5 pct), not from integrating the final lo/hi band. Force S(0)=1 on point, lo, hi, and all bootstrap curves. score_single(): expose rmst / rmst_lo / rmst_hi plus horizon-generalized rmst_{H}m keys (H = art["horizon_months"]). frontend: show "expected survival time within 5 years (RMST): X months (95% CI ...)" under the survival CI, with an explanatory note (en/ko). Figure unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>d37bd3d
-
Entropy low/intermediate/high (ln2, ln4); English base UI + KR toggle
- runtime: entropy_level from ln(2)/ln(4) cutoffs (low<ln2<=intermediate<ln4<=high), replacing the median-based binary flag. - frontend: entropy card now shows Low/Intermediate/High (green/amber/red). - full i18n: English is the base language, header 한국어/English toggle (persisted in localStorage); all UI strings + dynamic result/curve/batch labels switch language live. - batch table trimmed to id/T/surv/CI/SCR/entropy/TNM. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>e32b28f
-
SCR high/low vs absolute 0.75 threshold; dashed TNM KM lines
- runtime: SCR flag now uses absolute 0.75 cutoff (was SNUH median); entropy stays median-based. Adds scr_threshold to result. - SCR card shows '· 0.75 기준' note; entropy card no note. - chart: TNM-stage population KM lines are dashed (stroke-dasharray), the patient's predicted S(t) stays a solid bold line. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>ec124ba
-
TNM-stratified KM (SNUH+YUHS) + TNM/SCR/Entropy metrics
- artifact: per-TNM-group KM curves from SNUH+YUHS combined (n=3947), plus SNUH node-positive median SCR/entropy and the TNM (T,N)->group mapping. KM(60) is monotone by stage (IB .92 -> IIIC .32), validating the grouping. - runtime: derive N from total metastatic nodes -> TNM group/stage; flag SCR/entropy high|low vs SNUH median; add to predict result. - schema serves the static TNM KM curves (torch-free). - frontend metrics reduced to TNM (T3N3a + group/stage), SCR, Entropy. SCR/Entropy show big HIGH/LOW (SCR high=green good, entropy high=red poor) with the numeric value small beside it. risk_mean/std removed. - chart: all TNM-stage KM curves overlaid with the patient's predicted S(t) (bold), patient's own stage bolded. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>c99f2f1
-
Add predicted survival curve S(t) with 95% CI band + reference KM
Baseline artifact now carries a time-resolved baseline survival curve S_center(t) (0-60mo), its bootstrap band, and the reference-cohort marginal KM, all computed with the same frozen Cox calibration (lifelines) used for the horizon point: S(t|risk) = S_center(t) ** exp(beta*(risk-risk_center)), so the curve's 60-month value equals the reported surv exactly (verified to 1e-10; S_center(60)==S0_H). - runtime.patient_curve(risk): per-patient S(t), 95% CI band, ref KM - score_single now returns result['curve'] - frontend renders it as an inline SVG below the metrics (CSP-safe, no libs): patient line, shaded 95% CI, dashed SNUH reference KM, 60mo marker. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>3c0de1b
-
Load ensemble in background so the Space becomes healthy immediately
Previously runtime.init() (310-checkpoint load) ran inside the FastAPI lifespan startup, so uvicorn never accepted connections until the whole ensemble loaded. On HF cpu-basic this left the Space stuck in APP_STARTING with no logs. Now baseline loads inline and the ensemble loads in a daemon thread, so uvicorn serves at once and HF marks the Space RUNNING; predictions block only until the background load finishes. Adds a lock, flushed logs, traceback capture, and /health model_ready. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>38e35c6 -
Replace 5-model ML ensemble with DualPath survival web tool
Serve only the DualPathSurvivalModel 31-seed x 10-fold ensemble (310 checkpoints) + frozen risk->S(H) baseline calibration, ported from webtool_runtime.py. Removes CoxPH/RSF/CatBoost/GNN/MLP models and the full 196-column feature pipeline. New I/O: - input : T stage (1..6), per-station metastasis count, per-station harvest - output: expected 5-year survival S(H|risk) + 95% CI, risk_mean(+/-std), SCR_3, entropy, total_meta, extrapolation flag - app/runtime.py : ensemble loader + JSON scoring API - app/webtool_core.py: standalone model/feature/ensemble definitions - app/main.py : /api/predict, /api/predict-csv, /api/schema, /api/sample - frontend/index.html: 16-station input form + survival result panel - weights/ (LFS 423MB), webtool_baseline.json - requirements trimmed to torch/numpy/pandas/scipy/fastapi Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>9b64146