Tpot: [deprecation] the FutureWarning by scikit-learn

Created on 24 Dec 2019  路  3Comments  路  Source: EpistasisLab/tpot

It runs with FutureWarning while from tpot import TPOTClassifier, TPOTRegressor

Context of the issue

/path/to/project/venv/bin/python /Users/lennon/recent/asteria/test/ex.py
/Users/lennon/recent/asteria/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.metrics.scorer module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.
  warnings.warn(message, FutureWarning)
/path/to/project/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.feature_selection.base module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.feature_selection. Anything that cannot be imported from sklearn.feature_selection is now part of the private API.
  warnings.warn(message, FutureWarning)

Process to reproduce the issue

Just below.

from tpot import TPOTClassifier, TPOTRegressor
tpot = TPOTClassifier(generations=5, population_size=50, verbosity=2, random_state=42)

Expected result

as the context above.

bug

All 3 comments

It seems a compatibility issue with the latest scikit-learn 0.22 since there is no warning message with scikit-learn 0.21.3. But TPOT should work with those warnings. We will fix it in next version of TPOT.

The issue was fixed in the latest version of TPOT, thus I closed this issue. Please feel free to reopen this issue if you have any questions.

I believe that, with the newer version of _scikit-learn_, the public API is the only one supported, and that corresponds only to the top-level modules.
Thus, for example, on file gp_deap.py, line 33, where I see
from sklearn.model_selection._split import check_cv
should be
from sklearn.model_selection import check_cv

There may be some other places on the code you may want to check for future-proofing your project.

Was this page helpful?
0 / 5 - 0 ratings