diff options
author | Étienne Mollier <emollier@debian.org> | 2023-08-30 22:38:17 +0200 |
---|---|---|
committer | Étienne Mollier <emollier@debian.org> | 2023-08-30 22:38:17 +0200 |
commit | 5a05ab3bbbc50d6436fb9632451cfd587d694fa7 (patch) | |
tree | 5437b287fe4b664ef7cb39fc24709f9d04a6982d | |
parent | 3c081f0459c9a044c5d73475e247d8eaddb4f0a7 (diff) |
convert-estimator.patch: new: fix autopkgtest failure.
-rw-r--r-- | debian/patches/convert-estimator.patch | 28 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/debian/patches/convert-estimator.patch b/debian/patches/convert-estimator.patch new file mode 100644 index 0000000..6bf040c --- /dev/null +++ b/debian/patches/convert-estimator.patch @@ -0,0 +1,28 @@ +Description: fix use of obsolete base_estimator AdaBoost attribute + The AdaBoostRegressor base_estimator attribute has been renamed "estimator" + in scikit 1.2 onwards. +Author: Étienne Mollier <emollier@debian.org> +Bug: https://github.com/qiime2/q2-sample-classifier/issues/227 +Last-Update: 2023-08-30 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- q2-sample-classifier.orig/q2_sample_classifier/tests/test_estimators.py ++++ q2-sample-classifier/q2_sample_classifier/tests/test_estimators.py +@@ -398,7 +398,7 @@ + parameter_tuning=True, classification=True, + missing_samples='ignore', base_estimator="DecisionTree") + self.assertEqual(type(abe.named_steps.est), AdaBoostClassifier) +- self.assertEqual(type(abe.named_steps.est.base_estimator), ++ self.assertEqual(type(abe.named_steps.est.estimator), + DecisionTreeClassifier) + + def test_train_adaboost_extra_trees(self): +@@ -408,7 +408,7 @@ + parameter_tuning=True, classification=True, + missing_samples='ignore', base_estimator="ExtraTrees") + self.assertEqual(type(abe.named_steps.est), AdaBoostClassifier) +- self.assertEqual(type(abe.named_steps.est.base_estimator), ++ self.assertEqual(type(abe.named_steps.est.estimator), + ExtraTreeClassifier) + + # test some invalid inputs/edge cases diff --git a/debian/patches/series b/debian/patches/series index 70969ce..bee42c3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ py2to3test.patch reduce-precision-in-tests.patch fix-autopkgtest.patch sklearn-1.2.1.patch +convert-estimator.patch |