Search code examples
pythonjupyter-notebookjupyter-labhuggingface-transformers

Jupyter kernel dies when importing pipeline function from transformers class on Mac OS


I'm unable to import pipeline function of transformers class as my jupyter kernel keeps dying. Tried on transformers-4.15.0 and 4.16.2. Anyone faced this issue?

I tried importing the class in a new notebook as you can see in the image and it keeps killing the kernel.

Jupyter Lab Screenshot


Solution

  • It works fine for me.

    enter image description here

    You could try creating a fresh conda environment and reinstalling the app.

    You could also try using jupyterlab instead of jupyter-notebook.

    Are you on Mac OS? I couldn't get it to run at first using conda install transformers my jupyterlab kept hanging as well.

    Then I did this, conda install -c huggingface transformers and here is the result.

    enter image description here

    It works fine for me on linux and Mac now.