Refactor inference engine and task management: Remove obsolete inference engine and ONNX engine files, update inference processing to utilize batch handling, and enhance task management structure in documentation. Adjust paths for task specifications to align with new directory organization.

This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-03-28 01:04:28 +02:00
parent 1e4ef299f9
commit 5be53739cd
60 changed files with 111875 additions and 208 deletions
+6 -7
View File
@@ -1,4 +1,5 @@
import json
import os
import threading
import time
import uuid
@@ -7,17 +8,17 @@ import pytest
import requests
_DETECT_TIMEOUT = 60
_MEDIA = os.environ.get("MEDIA_DIR", "/media")
def _ai_config_video(mock_loader_url: str) -> dict:
base = mock_loader_url.rstrip("/")
def _ai_config_video() -> dict:
return {
"probability_threshold": 0.25,
"tracking_intersection_threshold": 0.6,
"altitude": 400,
"focal_length": 24,
"sensor_width": 23.5,
"paths": [f"{base}/load/video_short01.mp4"],
"paths": [f"{_MEDIA}/video_short01.mp4"],
"frame_period_recognition": 4,
"frame_recognition_seconds": 2,
}
@@ -49,7 +50,6 @@ def test_ft_n_07_annotations_unreachable_detection_continues(
warm_engine,
http_client,
jwt_token,
mock_loader_url,
mock_annotations_url,
sse_client_factory,
):
@@ -57,7 +57,7 @@ def test_ft_n_07_annotations_unreachable_detection_continues(
f"{mock_annotations_url}/mock/config", json={"mode": "error"}, timeout=10
).raise_for_status()
media_id = f"res-n07-{uuid.uuid4().hex}"
body = _ai_config_video(mock_loader_url)
body = _ai_config_video()
headers = {"Authorization": f"Bearer {jwt_token}"}
collected = []
thread_exc = []
@@ -122,12 +122,11 @@ def test_nft_res_02_annotations_outage_during_async_detection(
warm_engine,
http_client,
jwt_token,
mock_loader_url,
mock_annotations_url,
sse_client_factory,
):
media_id = f"res-n02-{uuid.uuid4().hex}"
body = _ai_config_video(mock_loader_url)
body = _ai_config_video()
headers = {"Authorization": f"Bearer {jwt_token}"}
collected = []
thread_exc = []