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

   Fixes #37779.
   
   `RunOneDetector` reshuffles input before scoring. Existing transform tests 
used online Z-score detectors and matched each example against scores 
calculated in creation order. Runner scheduling can legally change that order 
independently for each ensemble branch, changing detector state and scores. 
This caused the keyed failure reported in #37779 and a new unkeyed failure in 
[Python ML 
precommit](https://github.com/apache/beam/actions/runs/31140935654/job/92750492308).
   
   Replace transform fixtures with an order-independent single-feature 
detector. Coverage remains for keyed and unkeyed inputs, feature selection, 
thresholds, ensemble grouping, and `AnyVote` aggregation. Z-score learning 
behavior remains covered by `detectors/zscore_test.py`.
   
   ## Reproduction
   
   Forcing one detector branch to consume reversed input reproduces score 
mismatches before this change. Reversing keyed and unkeyed inputs passes all 
six anomaly transform cases afterward.
   
   ## Testing
   
   - `./gradlew :sdks:python:test-suites:tox:py313:testPython313 
-Pposargs='apache_beam.ml.anomaly.transforms_test'` (12 passed)
   - Reversed-order keyed and unkeyed transform cases (6 passed)
   - YAPF, Ruff, and Pyrefly checks
   
   No `CHANGES.md` entry. Test-only change.
   


-- 
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