Let the ACR API start before heavy model dependencies load
Constraint: service health and config endpoints should stay reachable even when training-time dependencies like torch are not installed Rejected: importing retrieval engines at module load | it makes the whole API crash before reporting dependency gaps clearly Confidence: high Scope-risk: narrow Directive: keep runtime dependency checks inside request-time engine loading so infra can health-check the service independently of model installation state Tested: /usr/local/miniconda3/bin/python -m unittest discover -s acr-engine/tests -v; /usr/local/miniconda3/bin/python -m uvicorn src.service.app:app --host 127.0.0.1 --port 8000 with successful /health response; POST /recognize/voice currently returns a clear 500 dependency error when torch is missing Not-tested: successful end-to-end /recognize/voice inference without torch installed
Showing
1 changed file
with
10 additions
and
6 deletions
-
Please register or sign in to post a comment