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

Superlearnerl on google colab (python 3.10 or 3.7) #155

Open
andresilvapimentel opened this issue Dec 31, 2023 · 3 comments
Open

Superlearnerl on google colab (python 3.10 or 3.7) #155

andresilvapimentel opened this issue Dec 31, 2023 · 3 comments

Comments

@andresilvapimentel
Copy link

I am trying to run Superlearner on google colab (python 3.10 or 3.7), but I am getting an error in the Superlearner import (from mlens.ensemble import SuperLearner). The error is:

from collections import Sequence

ImportError: cannot import name ‘Sequence’ from ‘collections’ (/usr/lib/python3.10/collections/init.py)

Do you know how to solve this issue?
Thank you in advance.

@andresilvapimentel
Copy link
Author

I found the following:
To solve the Python "ImportError: cannot import name 'Sequence' from 'collections'" error:
Import the Sequence class from collections. abc , as a change was made in Python 3.10.
Update the versions of any modules that have old import statements.

But I did not try it. Could you update this Sequence class from collections. abc , please?

@andresilvapimentel
Copy link
Author

Please, see this on:
skorch-dev/skorch#895
python3.10 -c "from collections.abc import Sequence"

@andresilvapimentel
Copy link
Author

Solved

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