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

Jupyterlite kernel fails to launch #752

Closed
LeoGrin opened this issue Sep 25, 2023 · 7 comments
Closed

Jupyterlite kernel fails to launch #752

LeoGrin opened this issue Sep 25, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@LeoGrin
Copy link
Contributor

LeoGrin commented Sep 25, 2023

Describe the bug

I cannot run the Skrub examples using Jupyterlite (https://skrub-data.org/stable/lite/lab/) (#625 #633). It's stuck on the first cell I try to run, and the kernel status is shown as "Unknown".

Not sure if this is related, but the rendering doesn't work either:
image

Steps/Code to Reproduce

Go to https://skrub-data.org/stable/lite/lab/ and try to run an example. I would like to see if other people are having the same issue (for me scikit-learn's examples are working).

Expected Results

The examples can be run on jupyterlite.

Actual Results

Kernel status "Unknown", notebook stuck on the first cell execution.

Versions

MacOS 12.6.5
Google Chrome Version 117.0.5938.88 (Official Build) (arm64)
@LeoGrin LeoGrin added the bug Something isn't working label Sep 25, 2023
@Vincent-Maladiere
Copy link
Member

Vincent-Maladiere commented Sep 27, 2023

Thanks for spotting, @LeoGrin. I can reproduce your error. Upon opening a jupyterlite notebook, the service fails at importing micropip (you can see it in the web console)

Uncaught (in promise) PythonError: Traceback (most recent call last):
  File "/lib/python311.zip/_pyodide/_base.py", line 540, in eval_code_async
    await CodeRunner(
  File "/lib/python311.zip/_pyodide/_base.py", line 365, in run_async
    await coroutine
  File "<exec>", line 4, in <module>
  File "/lib/python3.11/site-packages/piplite/__init__.py", line 2, in <module>
    from .piplite import install
  File "/lib/python3.11/site-packages/piplite/piplite.py", line 16, in <module>
    from micropip.package_index import ProjectInfo
ModuleNotFoundError: No module named 'micropip.package_index'

This is probably an issue with jupyterlite (or maybe with its interface with sphinx), I'll post an issue on jupyterlite.

What I don't understand is that we mirror scikit-learn configuration of jupyterlite with sphinx (in conf.py and setup.cfg) while the jupyterlite doc in scikit-learn works fine.

cc @glemaitre and @lesteve who might bring more context.

@glemaitre
Copy link
Member

Not sure if this is related, but the rendering doesn't work either:

The rendering is something different and linked to RST but we cannot do much about it.

@lesteve
Copy link
Contributor

lesteve commented Sep 27, 2023

Not 100% sure, but this could be an issue of generating the stable doc with an old version of jupyterlite and a new Pyodide version having been released.

Maybe you want a jupyterlite-json like on your stable branch, https://github.com/skrub-data/skrub/blob/main/doc/jupyter-lite.json so that it happens less?

One reason that makes me say this, your dev doc JupyterLite seems to work fine https://skrub-data.org/dev/lite/lab/

@psychemedia
Copy link

I'm not seeing any kernels at all installed in your jupyterlite instance? (In recent versions of jupyterlite, I think you need to install a kernel explicitly when building jupyterlite)

image

@jeromedockes
Copy link
Member

jupyterlite seems to be working for me now on the stable and dev branch. I have a question for @glemaitre : we have in the doc configuration the URL of the wheel to install here (at the moment it uses 0.0.1)

does this mean after a release we need to update this url, rebuild the doc & push to the stable branch?

@GaelVaroquaux
Copy link
Member

GaelVaroquaux commented Jul 1, 2024 via email

@jeromedockes
Copy link
Member

I checked, and it does work now.

cool :) I think that if @lesteve 's suspicion above was right, it probably started working back in December when we did the 0.1.0 release and thus the stable doc was built with the jupyter-lite.json file added by @glemaitre -- we just didn't realize and close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants