iindyk commented on a change in pull request #13175:
URL: https://github.com/apache/beam/pull/13175#discussion_r570716042
##########
File path: sdks/python/apache_beam/transforms/stats.py
##########
@@ -327,27 +330,39 @@ class Globally(PTransform):
weighted: (optional) if set to True, the transform returns weighted
quantiles. The input PCollection is then expected to contain tuples of
input values with the corresponding weight.
+ batch_input: (optional) if set to True, the transform expects each
element
+ of input PCollection to be a batch. Provides a way to accumulate
Review comment:
1. Done, also added examples.
2. I think tuple (element, weight) generalizes the same way to (elements,
weights) as it does to [(element1, weight1), ...], so I don't see any strong
advantage of either from usability perspective (for instance, TFT's quantiles
take them as separate tensors), but there's a benefit in taking (elements,
weights) from code simplicity perspective - it allows weighted and unweighted
cases to have a lot of code in common.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]