[ 
https://issues.apache.org/jira/browse/BEAM-10824?focusedWorklogId=481024&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-481024
 ]

ASF GitHub Bot logged work on BEAM-10824:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Sep/20 19:47
            Start Date: 09/Sep/20 19:47
    Worklog Time Spent: 10m 
      Work Description: monicadsong commented on a change in pull request 
#12756:
URL: https://github.com/apache/beam/pull/12756#discussion_r485875491



##########
File path: sdks/python/apache_beam/transforms/stats_test.py
##########
@@ -41,13 +40,15 @@
 from apache_beam.transforms.display import DisplayData
 from apache_beam.transforms.display_test import DisplayDataItemMatcher
 from apache_beam.transforms.stats import ApproximateQuantilesCombineFn
+from apache_beam.transforms.stats import ApproximateUniqueCombineFn
 
 
 class ApproximateUniqueTest(unittest.TestCase):
-  """Unit tests for ApproximateUnique.Globally and ApproximateUnique.PerKey.
-  Hash() with Python3 is nondeterministic, so Approximation algorithm generates
-  different result each time and sometimes error rate is out of range, so add
-  retries for all tests who actually running approximation algorithm."""
+  """Unit tests for ApproximateUnique.Globally, ApproximateUnique.PerKey,
+  and ApproximateUniqueCombineFn.

Review comment:
       sounds good thanks! more info on py3 hash here: 
https://stackoverflow.com/questions/27522626/hash-function-in-python-3-3-returns-different-results-between-sessions




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


Issue Time Tracking
-------------------

            Worklog Id:     (was: 481024)
    Remaining Estimate: 10h 10m  (was: 10h 20m)
            Time Spent: 13h 50m  (was: 13h 40m)

> Hash in stats.ApproximateUniqueCombineFn NON-deterministic
> ----------------------------------------------------------
>
>                 Key: BEAM-10824
>                 URL: https://issues.apache.org/jira/browse/BEAM-10824
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Monica Song
>            Priority: P1
>              Labels: hash
>   Original Estimate: 24h
>          Time Spent: 13h 50m
>  Remaining Estimate: 10h 10m
>
> The python hash() function is non-deterministic. As a result, different 
> workers will map identical values to different hashes. This leads to 
> overestimation of the number of unique values (by several magnitudes, in my 
> experience x1000) in a distributed processing model. 
> [https://github.com/apache/beam/blob/master/sdks/python/apache_beam/transforms/stats.py#L218]
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to