System: Windows with Jupyterlab in Anaconda
I am running an imaging annotation cnn in Jupyterlab from Anaconda. Everything worked fine until yesterday I ran the same code, and the kernel shows "Kernel Restarting The kernel for address/Unet.ipynb appears to have died. It will restart automatically."
Line-by-line debugging found that in a new kernel, if I run "import torch" prior to "import skimage.io", it crashes the kernel and it shows "Kernel Restarting". However, if I run "import skimage.io" prior to "import torch" everything works fine. So I
In another file running Unet segmentation, it also crashed during a long for a loop.
I have the below temporary solution worked, but I also want to know why it happened and whether there is a way to solve the issue once and for all. I read a few similar questions and found it could be a Torch or version issue. Thank you to anyone who contributes!
Tried the below code and worked (so far): import os os.environ['KMP_DUPLICATE_LIB_OK']='True'
Tried the below codes but were unluck:
Create a new environment and start over
Confirmed CPU/GPU... is not out of memory
reinstalled pytorch, pytorch-cuda, torchvision,torchaudio,
conda update torch torchvision
conda update scikit-image
conda update mkl
conda update --all
conda install numpy
conda install -c intel mkl
conda install tensorflow
conda install -c anaconda keras
pip uninstall mpi4py
Update Anaconda