Open liougehooa opened 1 week ago
Hello! You're running this in a notebook?
+1 Facing the same issue
Yes
Seems like this is a real issue - if anyone wants to investigate this and maybe file a PR, feel free to take it!
Would the same issue be reproducible on colab too? I tried reproducing in notebook and it worked without an error. May be either something is missing in the steps to reproduce. or it is a path error for the tracker unable to update the progress which might have happened only on your setup. Please share further details to seek help.
Adjust the time.sleep value to control the speed of the progress bar.
Hello, I've tried reproducing this issue but could not get the reported error.
Screen recording: https://github.com/user-attachments/assets/1631ffcf-5599-44c4-a0b0-7893e14c9bb7
I tried:
pip install -e ".[dev-torch]"
. The bar displays correctly..train
method from transformers.Trainer
like above and the bar displayed correctly on the jupyter notebook.pip install -e ".[quality]"
, I also created a requirements.txt to install the exact versions of IPython, ipykernel, ipywidgets... reported above the only difference is the transformers version. Mine is 4.47.0.dev0 and the reported one is 4.45.2.This is my first attempt to contribute here, so please do tell if I should have done something else.
It seems as if this issue is more platform-specific. I was also unable to reproduce the issue using the following Dockerfile configuration. From the traceback, it seems that Azure and anaconda is used. Maybe a more specific environment setup is needed.
FROM python:3.10.11-slim
WORKDIR /app
# Install system dependencies for Jupyter and other needed tools
RUN apt-get update &&
apt-get install -y --no-install-recommends
git
build-essential &&
rm -rf /var/lib/apt/lists/*
# Install Python dependencies including Jupyter and the Transformers library
RUN pip install --upgrade pip &&
pip install jupyterlab==4.0.11
transformers==4.45.2
torch
ipywidgets==7.7.1
ipython==8.27.0
jupyter_client==7.4.9
jupyter_core==5.7.2
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
notebook==6.5.7
qtconsole==5.6.0
traitlets==5.14.3
wandb
# Set environment variables for Jupyter Notebook
ENV JUPYTER_ENABLE_LAB=yes EXPOSE 8888
COPY . .
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root"] ```
It seems as if this issue is more platform-specific. I was also unable to reproduce the issue using the following Dockerfile configuration. From the traceback, it seems that Azure and anaconda is used. Maybe a more specific environment setup is needed.
FROM python:3.10.11-slim WORKDIR /app # Install system dependencies for Jupyter and other needed tools RUN apt-get update && apt-get install -y --no-install-recommends git build-essential && rm -rf /var/lib/apt/lists/* # Install Python dependencies including Jupyter and the Transformers library RUN pip install --upgrade pip && pip install jupyterlab==4.0.11 transformers==4.45.2 torch ipywidgets==7.7.1 ipython==8.27.0 jupyter_client==7.4.9 jupyter_core==5.7.2 nbclient==0.10.0 nbconvert==7.16.4 nbformat==5.10.4 notebook==6.5.7 qtconsole==5.6.0 traitlets==5.14.3 wandb # Set environment variables for Jupyter Notebook ENV JUPYTER_ENABLE_LAB=yes EXPOSE 8888 COPY . . CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root"] ```
I tested in colab. This seems working. I tested in some regions(us east2, us west 3) with Azure ML Notebook, it doesn't work. But it could work in swedencentral, and some other regions in Europe.
I agree this is more platform-specific.
System Info
Error info:
Code:
Env info: Jupyter version:
Python: 3.10.11 jupyter lab: 4.0.11 transformers: 4.45.2
Detailed errors:
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
This can be reproduced by the following code:
Expected behavior
Training with progress bar being updated: