Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add option for pairwise

laurenspriem5afb0ff470d5
diff --git a/infra/ml/test/README.md b/infra/ml/test/README.md
index 4a787cd3f9..66b115e3c8 100644
--- a/infra/ml/test/README.md
+++ b/infra/ml/test/README.md
@@ -35,6 +35,7 @@ Common flags:
- `--render-detection-overlays` (generate annotated detection images under `out/parity/detections/<platform>/`; includes selected platforms plus `python` ground truth)
- `--reuse-mobile-application-binary` (reuse an existing built mobile binary when available; useful for repeated local parity runs without code changes)
- `--no-parallel-mobile-runners` (force sequential android/ios runner execution)
+- `--include-pairwise` (also compare non-ground-truth platform pairs such as `android -> ios`)
Outputs go to `infra/ml/test/out/parity/` by default, including:
diff --git a/infra/ml/test/ground_truth/manifest.json b/infra/ml/test/ground_truth/manifest.json
index dc06157399..4d8bf79d79 100644
--- a/infra/ml/test/ground_truth/manifest.json
+++ b/infra/ml/test/ground_truth/manifest.json
@@ -216,7 +216,7 @@
"clip_cosine_distance": 0.015,
"cross_platform_clip_cosine_distance": 0.015,
"face_embedding_cosine_distance": 0.015,
- "box_iou_threshold": 0.98,
+ "box_iou_threshold": 0.8,
"landmark_error_threshold": 0.03,
"score_delta_threshold": 0.1
}
diff --git a/infra/ml/test/ml-indexing-parity-test-plan.md b/infra/ml/test/ml-indexing-parity-test-plan.md
index 59b69c75b0..a15ea0e995 100644
--- a/infra/ml/test/ml-indexing-parity-test-plan.md
+++ b/infra/ml/test/ml-indexing-parity-test-plan.md
@@ -289,6 +289,7 @@ Flags:
4. `--allow-empty-comparison` (optional override when intentionally running without any platform outputs)
5. `--output-dir ...`
6. `--verbose` (optional, streams full logs/tables to terminal)
+7. `--include-pairwise` (optional, includes non-ground-truth pairwise platform comparisons)
Target runtime: 10-20 minutes for full local run (with caching).
diff --git a/infra/ml/test/tools/run_suite.sh b/infra/ml/test/tools/run_suite.sh
index 06571fc0fb..f11a272c70 100755
--- a/infra/ml/test/tools/run_suite.sh
+++ b/infra/ml/test/tools/run_suite.sh
@@ -22,6 +22,7 @@ VERBOSE=false
RENDER_DETECTION_OVERLAYS=false
REUSE_MOBILE_APPLICATION_BINARY=false
PARALLEL_MOBILE_RUNNERS=true
+INCLUDE_PAIRWISE=false
LOCAL_MIRROR_PORT=""
LOCAL_MIRROR_PID=""
@@ -44,6 +45,7 @@ Flags:
--render-detection-overlays (default: disabled; render annotated face detection images to out/parity/detections/<platform>/)
--reuse-mobile-application-binary (default: disabled; reuse an existing built mobile binary when available)
--no-parallel-mobile-runners (default: disabled; run android/ios runners sequentially)
+ --include-pairwise (default: disabled; include non-ground-truth pairwise platform comparisons)
EOF
}
@@ -93,6 +95,10 @@ while (($# > 0)); do
PARALLEL_MOBILE_RUNNERS=false
shift
;;
+ --include-pairwise)
+ INCLUDE_PAIRWISE=true
+ shift
+ ;;
-h|--help)
usage
exit 0
@@ -357,6 +363,7 @@ print_kv "render_detection_overlays:" "$RENDER_DETECTION_OVERLAYS"
print_kv "android_build_mode:" "${ML_PARITY_ANDROID_BUILD_MODE:-profile}"
print_kv "reuse_mobile_application_binary:" "$REUSE_MOBILE_APPLICATION_BINARY"
print_kv "parallel_mobile_runners:" "$PARALLEL_MOBILE_RUNNERS"
+print_kv "include_pairwise:" "$INCLUDE_PAIRWISE"
declare -a selected_platforms=()
case "$PLATFORMS" in
@@ -2074,9 +2081,11 @@ compare_log="$LOG_DIR/comparison.log"
compare_cmd=(
uv run --project "$UV_PROJECT_DIR" --no-sync python "$ML_DIR/tools/compare_parity_outputs.py"
--ground-truth "$PYTHON_OUTPUT_DIR/results.json"
- --no-pairwise
--output "$compare_output"
)
+if ! $INCLUDE_PAIRWISE; then
+ compare_cmd+=(--no-pairwise)
+fi
if ((${#compare_args[@]} > 0)); then
compare_cmd+=("${compare_args[@]}")
fi