mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 11:06:32 +00:00
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:
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
COMPOSE="docker compose -f docker-compose.test.yml --profile cpu"
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 <test_path> [pytest_args...]"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " $0 tests/test_video.py # run all tests in file"
|
||||
echo " $0 tests/test_video.py::test_ft_p_10_frame_sampling_ac1 # run single test"
|
||||
echo " $0 tests/test_video.py -k 'frame_sampling' # run by keyword"
|
||||
echo ""
|
||||
echo "Flags -v -x -s are always included."
|
||||
exit 1
|
||||
}
|
||||
|
||||
[[ $# -lt 1 ]] && usage
|
||||
|
||||
$COMPOSE up -d --build detections
|
||||
echo "--- Waiting for detections service to become healthy..."
|
||||
for i in $(seq 1 60); do
|
||||
if $COMPOSE exec -T detections python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/health')" 2>/dev/null; then
|
||||
echo "--- Detections service is healthy"
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo "--- Running: pytest $* -v -x -s --csv=/results/report.csv"
|
||||
$COMPOSE run --rm --no-deps e2e-runner pytest "$@" -v -x -s --csv=/results/report.csv
|
||||
EXIT_CODE=$?
|
||||
|
||||
echo "--- Test finished with exit code $EXIT_CODE"
|
||||
echo "--- Detections logs (last 100 lines):"
|
||||
$COMPOSE logs detections --tail 100
|
||||
exit $EXIT_CODE
|
||||
Reference in New Issue
Block a user