Harden YOLO compatibility preflight
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-06-17 01:59:00 +02:00
parent 794f1cd51e
commit 3f1a686bef
11 changed files with 170 additions and 3 deletions
+10
View File
@@ -23,6 +23,16 @@ datasets, vector FeatureCollection content, vector feature summary, persisted
QA/QC metrics, creates metadata/report/vector GeoJSON exports, lists exports
and downloads the JSON/GeoJSON/HTML artifacts through the frontend proxy.
Verify a configured local YOLO model without running inference:
```bash
python scripts/yolo_preflight.py --model-path /absolute/path/to/model.pt --tile-manifest-path /absolute/path/to/manifest.json --check-model-load --json
```
The model-load smoke is opt-in, requires real optional AI dependencies, refuses
`--assume-dependencies`, loads only the supplied local file and does not download
weights or run prediction.
Clean old offline demo export artifacts without touching uploaded source data:
```bash
+1
View File
@@ -37,6 +37,7 @@ ${PYTHON_BIN} scripts/validate_m13_codex_assets.py
${PYTHON_BIN} scripts/validate_m14_launch_assets.py
${PYTHON_BIN} -m py_compile scripts/gis_import_smoke.py
${PYTHON_BIN} -m py_compile scripts/seed_demo_workflow.py
${PYTHON_BIN} -m py_compile scripts/yolo_preflight.py
${PYTHON_BIN} -m py_compile scripts/cleanup_demo_artifacts.py
${PYTHON_BIN} -m py_compile backend/scripts/cleanup_demo_artifacts.py
${PYTHON_BIN} -m compileall backend/app
+8
View File
@@ -26,8 +26,15 @@ def main() -> int:
action="store_true",
help="Skip checking installed ultralytics/torch packages; useful for validating local paths on non-AI machines.",
)
parser.add_argument(
"--check-model-load",
action="store_true",
help="Explicitly load the configured local model file to verify Ultralytics compatibility; no inference is run.",
)
parser.add_argument("--json", action="store_true", help="Print JSON output only.")
args = parser.parse_args()
if args.check_model_load and args.assume_dependencies:
parser.error("--check-model-load cannot be combined with --assume-dependencies")
settings = Settings(
yolo_enabled=args.enabled or bool(args.model_path),
@@ -38,6 +45,7 @@ def main() -> int:
settings=settings,
tile_manifest_path=args.tile_manifest_path,
assume_dependencies=args.assume_dependencies,
check_model_load=args.check_model_load,
)
if args.json: