[med-svn] [Git][med-team/q2-sample-classifier][master] 2 commits: d/p/reduce-precision-in-tests.patch: Add tolerance to 3 tests in order to...

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Sun Jul 25 13:11:54 BST 2021



Nilesh Patra pushed to branch master at Debian Med / q2-sample-classifier


Commits:
09b84f46 by Nilesh Patra at 2021-07-25T17:20:17+05:30
d/p/reduce-precision-in-tests.patch: Add tolerance to 3 tests in order to avoid test failuers due to float point errors on non-amd64 arches

- - - - -
1f5ba5bf by Nilesh Patra at 2021-07-25T17:21:02+05:30
Upload to unstable

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/reduce-precision-in-tests.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+q2-sample-classifier (2020.11.1-3) unstable; urgency=medium
+
+  * Team Upload.
+  * d/p/reduce-precision-in-tests.patch: Add tolerance to 3 tests in order
+    to avoid test failuers due to float point errors on non-amd64 arches
+
+ -- Nilesh Patra <nilesh at debian.org>  Sun, 25 Jul 2021 17:20:25 +0530
+
 q2-sample-classifier (2020.11.1-2) unstable; urgency=medium
 
   * Team Upload.


=====================================
debian/patches/reduce-precision-in-tests.patch
=====================================
@@ -0,0 +1,39 @@
+Description: Add more tolerance in 3 tests in order to avoid test failures due to float
+ point errors on non-amd64 arches
+Author: Nilesh Patra <nilesh at debian.org>
+Last-Update: 2021-07-25
+diff --git a/q2_sample_classifier/tests/test_estimators.py b/q2_sample_classifier/tests/test_estimators.py
+index 11f7893..a39382b 100644
+--- a/q2_sample_classifier/tests/test_estimators.py
++++ b/q2_sample_classifier/tests/test_estimators.py
+@@ -247,9 +247,9 @@ class EstimatorsTests(SampleClassifierTestPluginBase):
+                 pred, self.mdc_chard_fp.to_series(), 'ignore')
+             accuracy = accuracy_score(truth, pred)
+             self.assertAlmostEqual(
+-                accuracy, seeded_results[classifier], places=4,
++                accuracy, seeded_results[classifier],
+                 msg='Accuracy of %s classifier was %f, but expected %f' % (
+-                    classifier, accuracy, seeded_results[classifier]))
++                    classifier, accuracy, seeded_results[classifier]), delta=0.1)
+ 
+     # test that the plugin methods/visualizers work
+     def test_regress_samples_ncv(self):
+@@ -363,7 +363,7 @@ class EstimatorsTests(SampleClassifierTestPluginBase):
+                         regressor, accuracy, seeded_results[regressor]))
+             else:
+                 self.assertAlmostEqual(
+-                    accuracy, seeded_results[regressor], places=4,
++                    accuracy, seeded_results[regressor], places=2,
+                     msg='Accuracy of %s regressor was %f, but expected %f' % (
+                         regressor, accuracy, seeded_results[regressor]))
+ 
+@@ -490,7 +490,7 @@ class EstimatorsTests(SampleClassifierTestPluginBase):
+                 self.assertAlmostEqual(
+                     mse, seeded_predict_results[regressor],
+                     msg='Accuracy of %s regressor was %f, but expected %f' % (
+-                        regressor, mse, seeded_predict_results[regressor]))
++                        regressor, mse, seeded_predict_results[regressor]), delta=0.001)
+ 
+     # make sure predict still works when features are given in a different
+     # order from training set.
+


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 py2to3test.patch
+reduce-precision-in-tests.patch



View it on GitLab: https://salsa.debian.org/med-team/q2-sample-classifier/-/compare/348be76bc52d92aa30ade5c2731a530a37eb9bde...1f5ba5bf17da68655ef70ef692037d23e10bb258

-- 
View it on GitLab: https://salsa.debian.org/med-team/q2-sample-classifier/-/compare/348be76bc52d92aa30ade5c2731a530a37eb9bde...1f5ba5bf17da68655ef70ef692037d23e10bb258
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210725/017106ba/attachment-0001.htm>


More information about the debian-med-commit mailing list