Open david-waterworth opened 1 year ago
Also note the Error displaying widget: model not found
occurs frequently, i.e. in place of the download progress bars when downloading model weights, datasets etc.
Hi @david-waterworth , I'm sorry you're experiencing this issue. As you said, there is most likely a compatibility issue between the installed packages. I tried it myself by just installing huggingface_hub
via pip in a AWS Sagemaker Studio session and it worked just fine.
Could you run conda list | grep "jupyter\|widget"
and check if maybe you have an missing/outdated package somewhere that breaks the widgets? Here is a screenshot of what I am getting on my side:
Also note in the System info - Running in notebook ?: No - but I am running in a notebook, it seems the notebook detection code doesn't recognise the AWS Sagemaker Studio notebook variant.
This is because you are running !huggingface-cli env
in a notebook which under the hood call the actual command line in a terminal. To get the information from a notebook, you should use
from huggingface_hub import dump_environment_info
dump_environment_info()
I admit that this is not really well documented but also not very problematic :)
@Wauplin I'm guessing from your suggestion that you used the Data Science
kernel. I switched to that and confirmed it does work fine.
But it doesn't work on the Base Python 3.0
kernel (which isn't based on conda and ships with py310 rather than py37 in Data Science kernel).
The output of the equivalent %pip list | grep "widget\|jupyter
on a fresh instance is:
jupyter_client 8.2.0
jupyter_core 5.3.1
After %pip install ipywidgets
ipywidgets 8.0.7
jupyter_client 8.2.0
jupyter_core 5.3.1
jupyterlab-widgets 3.0.8
widgetsnbextension 4.0.8
I restarted the kernel then tried to run notebook_login()
and it didn't render properly
What did work (with a clean kernel) was:
%pip install ipywidgets==7.7.5
The output of %pip list | grep "widget\|jupyter
is then
ipywidgets 7.7.5
jupyter_client 8.2.0
jupyter_core 5.3.1
jupyter-events 0.6.3
jupyter-lsp 2.2.0
jupyter_server 2.7.0
jupyter_server_terminals 0.4.4
jupyterlab 4.0.3
jupyterlab-pygments 0.2.2
jupyterlab_server 2.24.0
jupyterlab-widgets 1.1.4
widgetsnbextension 3.6.4
Also at this stage %pip install -U ipywidget
breaks it again - so looks like huggingface_hub
requires ipywidget<8.0.0
Thanks for investigating this @david-waterworth. I tried locally and for me the notebook login works when I have ipywidgets==8.0.2
installed so I expect the issue to be more tedious (don't know well AWS Sagemaker studio TBH but there has to be a difference compared to a local setup).
In any case, I'm glad that %pip install ipywidgets==7.7.5
fixes your issues. Not the ideal solution but if someone else come across this issue, at least there is a workaround. In the meantime, I'll try to investigate the real issue. I'm reluctant to pin the version of ipywidgets
has it could cause problem to other users while being valid in a vast majority of cases (i.e. when not running in AWS sagemaker studio).
I can confirm that I am getting the same error on Pytorch 1.13 Python 3.9
and Pytorch 2.0.0 Python 3.10
Kernels on SM Studio. Using ipywidgets==8.0.2
on these kernels has not solved the issue, But using ipywidgets==7.7.5
did work.
Describe the bug
It looks like there's a compatibility issue between the version of
jupyter
used byAWS Sagemaker Studio
,ipywidgets
and/orhuggingface_hub
I've installed the latest versions of
transformers
anddatasets
andipywidgets
and the output ofnotebook_login
wont render.Also note in the
System info
-Running in notebook ?: No
- but I am running in a notebook, it seems the notebook detection code doesn't recognise the AWS Sagemaker Studio notebook variant.As a workaround I'm using the cell magic
!huggingface-cli login --token $TOKEN
Reproduction
Error displaying widget: model not found
Logs
No response
System info