jupyterlab / jupyterlab-desktop

JupyterLab desktop application, based on Electron.
BSD 3-Clause "New" or "Revised" License
3.65k stars 349 forks source link

JuypterLab Kernel Restarting in Desktop app but not when running JupyterLab via terminal #759

Open prabirshrestha opened 7 months ago

prabirshrestha commented 7 months ago

Description

I get the following error when running from jupyterlab-desktop but not when running from the home-brew installation of Jupyter lab when running the server from the terminal.

image

Reproduce

!pip install --upgrade langchain #--quiet 
!pip install --upgrade sentence_transformers #--quiet 
from langchain.embeddings import HuggingFaceEmbeddings

embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2',
                                       model_kwargs={'device': 'cpu'})

Expected behavior

Shouldn't crash.

Context

Jupyter lab desktop with error:

Jupyter lab server with no error:

Seems like someone else also might have been facing similar issue as mentioned at https://github.com/jupyterlab/jupyterlab-desktop/issues/504. Is there some way to say have unlimited memory and let the OS handle this?

welcome[bot] commented 7 months ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

mbektas commented 7 months ago

@prabirshrestha this could be caused by one of the dependency Python packages. the environments you are comparing are not identical. could you try with the latest version (4.0.12), and by also updating the bundled environment?

prabirshrestha commented 7 months ago

I get the same error. I even tried following the uninstall instructions with clean installation as mentioned in https://github.com/jupyterlab/jupyterlab-desktop/blob/master/user-guide.md#uninstalling-jupyterlab-desktop.

JasonWeill commented 7 months ago

Do you see any error messages in the JupyterLab Desktop log when the kernel crashes? On macOS, the logs are in ~/Library/Logs/jupyterlab-desktop.

JasonWeill commented 7 months ago

@prabirshrestha Any errors in the logs?

prabirshrestha commented 7 months ago
Here is the log. ``` [2024-02-13 10:20:27.754] [warn] Connection lost, reconnecting in 0 seconds. [2024-02-13 10:20:27.762] [error] Uncaught (in promise) Error: Canceled future for kernel_info_request message before replies were done [2024-02-13 10:20:28.082] [warn] Failed to fetch ipywidgets through the "jupyter.widget.control" comm channel, fallback to fetching individual model state. Reason: Control comm was closed too early ```
usatenko commented 3 months ago

I have the same issue ( The log is the same