Add safe YOLO model env configurator
This commit is contained in:
@@ -4279,6 +4279,38 @@ Limitations:
|
||||
Next recommended pass:
|
||||
- Continue with V1 usability work that reduces operator confusion without expanding frozen product scope.
|
||||
|
||||
## Sprint 117 Safe local YOLO model activation (2026-07-06)
|
||||
|
||||
Changed:
|
||||
- Added `scripts/configure_yolo_model.py` to configure an existing local YOLO model into the deployment `.env` file without downloading model weights, loading a model or running inference.
|
||||
- The helper scans a mounted model directory for `.pt`, `.onnx` and `.engine` files, refuses no-model and ambiguous multi-model states, and writes env updates only when `--apply` is provided.
|
||||
- Added regression coverage in `backend/tests/test_sprint119_yolo_model_configuration.py` for no local model, ambiguous model selection, dry-run single model selection and env-file apply behavior.
|
||||
- Updated `scripts/README.md`, `deploy/unraid/README.md`, `backend/README.md`, `docs/TODO.md` and `CHANGELOG.md`.
|
||||
|
||||
Tested:
|
||||
- Red step: `python -m pytest backend\tests\test_sprint119_yolo_model_configuration.py -q` failed while `scripts/configure_yolo_model.py` was absent.
|
||||
- `python -m pytest backend\tests\test_sprint119_yolo_model_configuration.py -q` (`4 passed`)
|
||||
- `python -m py_compile scripts\configure_yolo_model.py`
|
||||
- `python -m compileall backend/app`
|
||||
- `cd backend && python -m pytest -q` (`375 passed`, existing Pydantic protected-namespace warnings remain)
|
||||
- `cd frontend && npm run typecheck`
|
||||
- `cd frontend && npm run build`
|
||||
- `bash scripts/run_readiness_check.sh` (`Run readiness check passed`)
|
||||
- `cd backend && python -m alembic heads` (`202606120900 (head)`)
|
||||
- `cd backend && python -m alembic upgrade head --sql`
|
||||
- `bash -n scripts/live_migration_smoke.sh`
|
||||
- `bash -n scripts/deploy_tower.sh`
|
||||
|
||||
Open:
|
||||
- No local YOLO model file is currently present on Tower under `/mnt/user/appdata/geointel/models`, so runtime YOLO activation remains intentionally not configured until the operator places a real model file.
|
||||
|
||||
Limitations:
|
||||
- Operational configuration helper only; no AI inference behavior, model download behavior, backend API contract, database migration, provider fetching or frontend product workflow changed.
|
||||
- If multiple local model files are present, the operator must choose one with `--model-file` so GeoIntel does not silently activate the wrong model.
|
||||
|
||||
Next recommended pass:
|
||||
- Place a real local model under `/mnt/user/appdata/geointel/models`, run the configurator with `--apply`, redeploy/restart the all-in-one container, then run the YOLO preflight with `--check-model-load` before any detection test run.
|
||||
|
||||
## Sprint 104 AI Lab action guardrails (2026-06-24)
|
||||
|
||||
Changed:
|
||||
|
||||
Reference in New Issue
Block a user