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

Update/Alias for imports for latest sklearn version and python >3.10 #67

Open
minghao51 opened this issue Feb 22, 2024 · 0 comments
Open

Comments

@minghao51
Copy link

As per #57 and also https://stackoverflow.com/questions/72032032/importerror-cannot-import-name-iterable-from-collections-in-python

The path for collections.Iterable (python >3.10 ) and sklearn.externals.six (sklearn ) is updated

Currently, for it to play nice with the updated packages, I had to aliases the path

import numpy as np
import collections.abc
import six
import sklearn
collections.Iterable = collections.abc.Iterable
sklearn.externals.six = six
from skrules import SkopeRules

Will there be able update for the path/checks?
perhaps, something like

try:
    from collections.abc import Iterable
except ImportError:
    from collections import Iterable

or another if that checks the versions

I can submit a PR for it if you guys are up for it

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

No branches or pull requests

1 participant