Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EvalML fails with Featuretools < 1.16.0, current version specifier is too loose #3822

Closed
AlifCor opened this issue Nov 3, 2022 · 2 comments · Fixed by #3823
Closed

EvalML fails with Featuretools < 1.16.0, current version specifier is too loose #3822

AlifCor opened this issue Nov 3, 2022 · 2 comments · Fixed by #3823
Assignees

Comments

@AlifCor
Copy link

AlifCor commented Nov 3, 2022

Problem

The current version constraint for Featuretools is featuretools >= 1.7.0, < 1.17.0. However, it seems that EvalML is not compatible with Featuretools < 1.16.0.

The following error is raised when importing the latest version of EvalML with Featuretools < 1.16.0 (1.7.0, 1.14.0 and 1.15.0 have been tried):

Traceback (most recent call last):
  File "[...]/evalml/__init__.py", line 9, in <module>
    import evalml.model_understanding
  File "[...]/evalml/model_understanding/__init__.py", line 39, in <module>
    from evalml.model_understanding.decision_boundary import (
  File "[...]/evalml/model_understanding/decision_boundary.py", line 7, in <module>
    from evalml.pipelines import BinaryClassificationPipeline
  File "[...]/evalml/pipelines/__init__.py", line 2, in <module>
    from evalml.pipelines.components import (
  File "[...]/evalml/pipelines/components/__init__.py", line 3, in <module>
    from evalml.pipelines.components.estimators import (
  File "[...]/evalml/pipelines/components/estimators/__init__.py", line 3, in <module>
    from evalml.pipelines.components.estimators.classifiers import (
  File "[...]/evalml/pipelines/components/estimators/classifiers/__init__.py", line 8, in <module>
    from evalml.pipelines.components.estimators.classifiers.xgboost_classifier import (
  File "[...]/evalml/pipelines/components/estimators/classifiers/xgboost_classifier.py", line 9, in <module>
    from evalml.pipelines.components.transformers import LabelEncoder
  File "[...]/evalml/pipelines/components/transformers/__init__.py", line 35, in <module>
    from evalml.pipelines.components.transformers.preprocessing import (
  File "[...]/evalml/pipelines/components/transformers/preprocessing/__init__.py", line 12, in <module>
    from evalml.pipelines.components.transformers.preprocessing.natural_language_featurizer import (
  File "[...]/evalml/pipelines/components/transformers/preprocessing/natural_language_featurizer.py", line 5, in <module>
    from featuretools.primitives import (
ImportError: cannot import name 'MeanCharactersPerWord' from 'featuretools.primitives' ([...]/featuretools/primitives/__init__.py)

Reproducible example

$ pip install featuretools==1.15.0 evalml
[...]
$ pip show evalml | grep Version
Version: 0.62.0
$ pip show featuretools | grep Version
Version: 1.15.0
$ python -c "import evalml"
Traceback (most recent call last):
[...]
$ pip install featuretools==1.16.0 evalml
[...]
$ python -c "import evalml"
[No errors]

Suggested fix

Enforcing Featuretools >= 1.16.0 in setup.cfg

Possible work-around for users

When installing EvalML, your dependency manager (e.g. Poetry) might resolve Featuretools to a version older than 1.16.0 (which happened to me in a complex project with many dependencies). In that case, you can explicitly add Featuretools >= 1.16.0 to your dependencies to force a compatible version. See the following pyproject.toml example for Poetry:

# ...
[tool.poetry.dependencies]
evalml = "^0.6.2"
featuretools = ">=1.16.0"
# ...
@thehomebrewnerd
Copy link
Contributor

@AlifCor This is a little tricky, but in this case the error is actually caused by the versions of featuretools and nlp-primitives that are getting installed, and not an incompatibility between EvalML and Featuretools.

If you want to use a version of Featuretools <1.16.0 you also need to downgrade your installed version of nlp-primitives to be <2.9.0 and everything should work fine.

@thehomebrewnerd
Copy link
Contributor

@AlifCor After some further discussion, we decided to go ahead with your suggestion and bump the minimum Featuretools version to 0.16.0. This change will be included in the next release of EvalML and will resolve this issue.

Thank you for reporting this and bringing it to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants