-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
Import torch always leads to Kernel Restarting #717
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
I was able to reproduce the issue. I cannot tell what the root cause is. possibly some configuration with torch library. I got it working by installing with conda. Could you try that? In a code cell you can run:
|
Thanks @mbektas ! Also, does this occur with JupyterLab, IPython, or any other Jupyter client, or is it specific to JupyterLab Desktop? Thanks! |
Thanks to you both for looking at this. So far, a conda install appears to be working. I'll report back more about a conda install after I try a few more machines and OSes. I developed the notebook for which I discovered this bug using JupyterLab (launched from command line). It was only when I opened the notebook using JupyterLab Desktop that the bug surfaced. I can reproduce the bug in JupyterLab Desktop, but not JupyterLab. I haven't tried other Jupyter clients. |
@roualdes I had tested with JupyterLab web application and had the same issue. Make sure you test with the same Python package versions of jupyterlab and pytorch & torchvision. It doesn't appear to be desktop application specific issue. |
@mbektas Should we move this issue to the jupyterlab/jupyterlab repo? |
I need to take a deeper look. I tested with the bundled Python environment in browser. Issue might be in the bundled environment. Let's keep it here still. |
I took another look at this issue. It appears to be an issue with torch library itself or its interaction with other libraries in the Python environment. Not an issue with JupyterLab web app or desktop app. Because, it is reproducible in a python REPL, just by |
@mbektas Thank you for the update! Because this can be reproduced with just the |
I have already moved on, so no need to leave this open as far as I'm concerned. I'll just add that I can not reproduce @mbektas' results. With Python 3.8.17 in JupyterLab.app 4.0.7-1 on MacOS 12.7 |
Description
When attempting to use PyTorch, the kernel restarts itself. In a fresh install of JupyterLab Desktop on Mac OS 12.7, but also on a number of my students machines both Macs and Windows, a Kernel Restarting message appears while attempting to use torch.
Reproduce
The following two code cells consistently reproduce a Kernel Restarting message on my Mac OS 12.7 in a fresh install of JupyterLab Deskop on Mac OS 12.7. The first cell executes as expected, and the second produces a Kernel Restarting message as often as I rerun the second cell.
which successfully runs. But then executing
fails with a Kernel Restarting message: The kernel for Untitled1.ipynb appears to have died. It will restart automatically.
Expected behavior
The code chunks above run and torch works normally on a CPU (with no GPU).
Context
Mac OS 12.7
JupyterLab Desktop Version 4.0.5
Installer: .dmg
Troubleshoot Output
The text was updated successfully, but these errors were encountered: