damccorm opened a new pull request, #41641:
URL: https://github.com/apache/beam/pull/41641

   Makes the two COCO MaskRCNN integration tests in 
`pytorch_inference_it_test.py` resilient to minor image-resizing rounding 
differences across Pillow/PyTorch versions:
   
   - MaskRCNN returns all detections above `box_score_thresh=0.05` sorted by 
score. Pillow `13.0.0` (used by Beam's Python 3.11–3.14 environments) produces 
a ±1/255 bilinear resize difference on two COCO val2017 images 
(`000000006818.jpg` and `000000331352.jpg`), which reorders nearly-tied 
detections and toggles borderline detections near `0.05`.
   - Adds `_assert_labels_match` to compare parsed detection label lists using 
an exact top-5 match plus `>= 0.8` multiset IoU, keeping the assertion 
meaningful across Pillow 10–13 without mutating the shared GCS golden files 
used by older release branches.
   
   *(Note: the 15 missing COCO `val2017` JPEG inputs referenced by 
`gs://apache-beam-ml/testing/inputs/it_coco_validation_inputs.txt` have also 
been restored to `gs://apache-beam-ml/datasets/coco/raw-data/val2017/`.)*
   
   ### Verification
   - Verified end-to-end as part of `direct:py313:torchInferenceTest` (5/5 
passed) locally and in [PostCommit Python (3.13) run 
45406881889](https://github.com/apache/beam/actions/runs/45406881889/job/138489879460)
 on #41595.
   
   Part of the stack leading up to re-enabling Python 3.13 
`inferencePostCommitIT` in #41595 (independent of the other prerequisite PRs; 
can be merged in any order).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to