10000 Upload a Python wheel for sklearn package · Issue #24204 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Upload a Python wheel for sklearn package #24204

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

Closed
rth opened this issue Aug 19, 2022 · 3 comments
Closed

Upload a Python wheel for sklearn package #24204

rth opened this issue Aug 19, 2022 · 3 comments
Labels
Needs Triage Issue requires triage

Comments

@rth
Copy link
Member
rth commented Aug 19, 2022

As you know a number of people install scikit-learn via pip install sklearn (or specify sklearn in their dependencies) which works due to the sklearn package alias. So far we still have no solution to let users know they shouldn't do this #8215

The problem is that if users try to install a package using the Pyodide distribution in their browser the installation will fail pyodide/pyodide#2989 because installing .tar.gz archives from PyPi is not supported (and will not be in the near future due to browser constraints) One solution is to upload a pure Python python wheel for the sklearn package. This will also make the installation a bit faster for all users who happened to use this alias.

The other solution is to try to fix packages that use sklearn in their dependencies, but without some centralized mechanism, it's a bit of a hopeless task.

@github-actions github-actions bot added the Needs Triage Issue requires triage label Aug 19, 2022
@lesteve
Copy link
Member
lesteve commented Aug 19, 2022

I don't know what else to say but 😭.

Maybe some additional motivation to revisit the brownout strategy discussed in #8215.

For good measure I will do a PR on the package that depends on sklearn that was found by your pyodide issue.

@ogrisel
Copy link
Member
ogrisel commented Aug 19, 2022

What would the wheel hold? nothing but a dependency on the true scikit-learn package?

I we want to go through the brownout strategy, the wheel might be a problem because there is no way to raise a warning or error at install time, only at import time. But that that would mean that the wheel would hold a fake yet importable sklearn top level module but this would collide with the true scikit-learn's sklearn top level module so both packages would not be installable at the same time (or behavior would not be predictable).

@rth
Copy link
Member Author
rth commented Aug 19, 2022

the wheel might be a problem because there is no way to raise a warning or error at install time, only at import time.

Yes, indeed, I forgot about the brownout idea. And it would indeed not work once a wheel is uploaded, so probably better not do that.

Closing this won't fix it then, thanks for the feedback. At some level, offending packages should fix it. And the worst-case scenario we could hardcode the alias during dependency resolution in Pyodide.

@rth rth closed this as completed Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Triage Issue requires triage
Projects
None yet
Development

No branches or pull requests

3 participants
0