You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by jm...@apache.org on 2021/07/01 20:21:24 UTC
[datasketches-cpp] 01/01: reduce tolerance of python tests to avoid
sporadic but meaningless test failures
This is an automated email from the ASF dual-hosted git repository.
jmalkin pushed a commit to branch py_tolerance
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
commit b0cc3773954a054ee4d74e49a891053df21721b9
Author: Jon Malkin <jm...@users.noreply.github.com>
AuthorDate: Thu Jul 1 13:18:40 2021 -0700
reduce tolerance of python tests to avoid sporadic but meaningless test failures
---
python/tests/kll_test.py | 4 ++--
python/tests/req_test.py | 4 ++--
python/tests/vector_of_kll_test.py | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/python/tests/kll_test.py b/python/tests/kll_test.py
index 696260f..5336bfa 100644
--- a/python/tests/kll_test.py
+++ b/python/tests/kll_test.py
@@ -30,10 +30,10 @@ class KllTest(unittest.TestCase):
kll.update(0.0)
# 0 should be near the median
- self.assertAlmostEqual(0.5, kll.get_rank(0.0), delta=0.025)
+ self.assertAlmostEqual(0.5, kll.get_rank(0.0), delta=0.035)
# the median should be near 0
- self.assertAlmostEqual(0.0, kll.get_quantile(0.5), delta=0.025)
+ self.assertAlmostEqual(0.0, kll.get_quantile(0.5), delta=0.035)
# we also track the min/max independently from the rest of the data
# which lets us know the full observed data range
diff --git a/python/tests/req_test.py b/python/tests/req_test.py
index 1e39bb7..9bf877d 100644
--- a/python/tests/req_test.py
+++ b/python/tests/req_test.py
@@ -30,10 +30,10 @@ class reqTest(unittest.TestCase):
req.update(0.0)
# 0 should be near the median
- self.assertAlmostEqual(0.5, req.get_rank(0.0), delta=0.03)
+ self.assertAlmostEqual(0.5, req.get_rank(0.0), delta=0.045)
# the median should be near 0
- self.assertAlmostEqual(0.0, req.get_quantile(0.5), delta=0.03)
+ self.assertAlmostEqual(0.0, req.get_quantile(0.5), delta=0.045)
# we also track the min/max independently from the rest of the data
# which lets us know the full observed data range
diff --git a/python/tests/vector_of_kll_test.py b/python/tests/vector_of_kll_test.py
index a432b1a..b61b1be 100644
--- a/python/tests/vector_of_kll_test.py
+++ b/python/tests/vector_of_kll_test.py
@@ -39,9 +39,9 @@ class VectorOfKllSketchesTest(unittest.TestCase):
kll.update(dat)
# 0 should be near the median
- np.testing.assert_allclose(0.5, kll.get_ranks(0.0), atol=0.025)
+ np.testing.assert_allclose(0.5, kll.get_ranks(0.0), atol=0.035)
# the median should be near 0
- np.testing.assert_allclose(0.0, kll.get_quantiles(0.5), atol=0.025)
+ np.testing.assert_allclose(0.0, kll.get_quantiles(0.5), atol=0.035)
# we also track the min/max independently from the rest of the data
# which lets us know the full observed data range
np.testing.assert_allclose(kll.get_min_values(), smin)
@@ -118,9 +118,9 @@ class VectorOfKllSketchesTest(unittest.TestCase):
kll.update(dat)
# 0 should be near the median
- np.testing.assert_allclose(0.5, kll.get_ranks(0.0), atol=0.025)
+ np.testing.assert_allclose(0.5, kll.get_ranks(0.0), atol=0.035)
# the median should be near 0
- np.testing.assert_allclose(0.0, kll.get_quantiles(0.5), atol=0.025)
+ np.testing.assert_allclose(0.0, kll.get_quantiles(0.5), atol=0.035)
# we also track the min/max independently from the rest of the data
# which lets us know the full observed data range
np.testing.assert_allclose(kll.get_min_values(), smin)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org