-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Use nightly WASM wheels for JupyterLite in the dev documentation #31085
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
DOC Use nightly WASM wheels for JupyterLite in the dev documentation #31085
Conversation
7daae78
to
ddacd76
Compare
This can be tried out from the JupyterLite deployment from this PR, which can now be used to run the latest code through the nightly wheels:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for the PR!
I tested your links and double-checked that the scikit-learn dev version was indeed used.
doc/conf.py
Outdated
" 'scikit-learn',\n" | ||
" index_urls='https://pypi.anaconda.org/scientific-python-nightly-wheels/simple',\n" | ||
" pre=True,\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like this would be better?
" 'scikit-learn',\n" | |
" index_urls='https://pypi.anaconda.org/scientific-python-nightly-wheels/simple',\n" | |
" pre=True,\n" | |
f" 'scikit-learn={release!r}',\n" | |
" index_urls='https://pypi.anaconda.org/scientific-python-nightly-wheels/simple',\n" |
There may be a future where we have a 1.6.1 Pyodide wheel and this will work more easily?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like this would be better?
I agree!
There may be a future where we have a 1.6.1 Pyodide wheel and this will work more easily?
There is jupyterlite-pyodide-kernel==0.6.0a4
which uses Pyodide 0.27.4 with scikit-learn 1.6.1, should I switch to it or would you like to wait until 0.6.0 stable lands? Here's the linked issue: jupyterlite/jupyterlite#1554
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I applied your suggestion in 5416684. I had to drop the raw string as it gets interpreted as 'scikit-learn=='1.7.dev0'',
instead, which is invalid syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is jupyterlite-pyodide-kernel==0.6.0a4 which uses Pyodide 0.27.4 with scikit-learn 1.6.1, should I switch to it or would you like to wait until 0.6.0 stable lands?
Thanks! I think we are fine to wait until jupyterlite-pyodide-kernel 0.6.0 lands.
Co-Authored-By: Loïc Estève <1680079+lesteve@users.noreply.github.com>
Co-Authored-By: Loïc Estève <1680079+lesteve@users.noreply.github.com>
Okay, the docs build passed and it seems to work well: https://output.circle-artifacts.com/output/job/7f6760fe-141c-4a9a-a8fe-3d1c1e09014a/artifacts/0/doc/lite/lab/index.html?path=auto_examples%2Fneighbors%2Fplot_regression.ipynb I do have to keep clearing the cookies/site data/cache, etc. to ensure I get the latest changes within the JupyterLite deployment. I wonder if we can support this without jupyterlite/jupyterlite-sphinx#121 so that we always have wheels cached in the browser storage – perhaps by adding UUIDs to the builds created by |
Actually, it looks like that behaviour can change with the upcoming JupyterLite 0.6.0, so we won't need to do anything: jupyterlite/jupyterlite#1601 |
Good to know! FYI I am sitting next to @jtpio right now and my understanding is that the jupyterlite 0.6 is coming soonish. |
I'll leave this PR open to wait for a second opinion, but I think this can be merged and we can always iterate in further PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for the PR. This is great!
Great to see this milestone achieved 🎉, thanks @agriyakhetarpal for your work on this! |
…cikit-learn#31085) Co-authored-by: Loïc Estève <1680079+lesteve@users.noreply.github.com>
Reference Issues/PRs
This PR builds on top of #29791 and #31078
What does this implement/fix? Explain your changes.
This PR updates the Sphinx-Gallery notebook modification function to install the Pyodide/WASM wheels for scikit-learn which are now available on https://anaconda.org/scientific-python-nightly-wheels/scikit-learn. This allows the JupyterLite-based interactive notebooks in the "Examples" section of the development version of the
scikit-learn
documentation to use as close to a tip-of-tree version ofscikit-learn
as it can be.cc: @lesteve
Any other comments?
N/A