beam
beam copied to clipboard
[Bug]: MajorityVote tie_breaker ignores a custom normal_label
What happened?
On master (1878a5b), MajorityVote(normal_label=5, outlier_label=7).apply([AnomalyPrediction(label=5), AnomalyPrediction(label=7)]) returns an AnomalyPrediction with label=0, which is neither configured label. tie_breaker defaults to the constant DEFAULT_NORMAL_LABEL (0); its docstring says "Defaults to 0 (normal_label)" and the existing test comment says "use normal to break ties by default". With normal_label=1, outlier_label=0 a tie returns the outlier label. Expected: a tie returns normal_label unless tie_breaker is given.
Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components
- [x] Component: Python SDK
- [ ] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam YAML
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Infrastructure
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Prism Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner
.take-issue