From 9f443b769390c3dd70b30ab49cab87c2669f944a Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Sat, 30 May 2026 21:32:52 +1000 Subject: [PATCH] fix: add gunicorn to services/ml_api deps; pin scikit-learn Render deploy failed with 'gunicorn: command not found' (exit 127) because render.yaml installs services/ml_api/requirements.txt, which lacked gunicorn. Add it, and pin scikit-learn==1.7.2 to match the version output/models was pickled with (avoids the InconsistentVersionWarning / invalid-results risk). Verified: gunicorn services.ml_api.main:app -k uvicorn.workers.UvicornWorker boots; /health ok and /analyze returns predictions. Co-Authored-By: Claude Opus 4.8 (1M context) --- services/ml_api/requirements.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/ml_api/requirements.txt b/services/ml_api/requirements.txt index 8f8935d..1ae6b21 100644 --- a/services/ml_api/requirements.txt +++ b/services/ml_api/requirements.txt @@ -1,6 +1,10 @@ fastapi uvicorn[standard] -scikit-learn +# Production server used by render.yaml (gunicorn + UvicornWorker). +gunicorn +# Pinned to the version the model artifacts in output/models were pickled with, +# to avoid scikit-learn's InconsistentVersionWarning / invalid-results risk. +scikit-learn==1.7.2 joblib numpy scipy