-
-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
[RFC] WASM / pyodide as a (somewhat) officially supported platform for scikit-learn #23727
Comments
Maybe we should start by listing the fraction of modules with failing test and scanning through them to estimate how many stem from a common known upstream limitation and how likely it is going to be lifted in the short to medium term or if there is a somewhat maintainable work-around we might want to include in the scikit-learn code base or as an external packaging patch. |
Yes, I think running it in CI is probably indeed a bit early (and also it would be really slow). The first more investigative steps could be a good start,
Then once we have some way to run Python code inside the browser from a Python script (or pytest) on the host, the question remains how to best run the full scikit-learn test suite. The problem is that when running In any case, if anyone is interested in investigating this, I'd be happy to talk more about it. |
Thanks for the summary, I agree with your plan. |
Once the test runner tooling is improved, we could imagine a nightly run that would run the test suite of each top level scikit-learn module and consolidate a report of scikit-learn modules that work without any failure, run with some test failures or finally cause an unrecoverable crash of a fatal error of the WASM runtime environment (it would be great to automatically collect the post-mortem output of the JS console of the browser in such a case). |
Btw, I think one of the benefits we'd get from WASM support is the ability to have interactive examples in the browser on the docs. I think that'll be a gamechanger for documentation. |
I put together a repo to run the scikit-learn inside Pyodide. I listed the issues I have spotted now there. This will need more investigation. Any feed-back, let me know! |
We started having bug reports (at least one indirect, in real life report at a conference: #23707) from users of scikit-learn in WASM environment (e.g. pyodide / jupyterlite, pyscript...).
Shall we invest effort in setting CI tooling to properly test and maybe even handle packaging of scikit-learn to target that platform?
It's very likely that not all of scikit-learn will work out of the box, but with proper tooling in place we could maintain a public list of modules that have all their tests that pass and maybe a list of modules that required so patches to handle graceful degradation to target this platform (e.g. number of parallel worker threads with n_jobs).
@rth put some interesting info in the following comment on how to run the tests:
Pros:
Cons:
The text was updated successfully, but these errors were encountered: