Termios error: (25, 'Inappropriate ioctl for device')
Author: ninagroot
Pull request: no

Hi, 

I'm working on distilling a language model using https://github.com/timinar/BabyLlama
I changed the dataset it trains on, but get the following error:

Traceback (most recent call last):
  File "/home/ngroot/anaconda3/envs/llmke/lib/python3.9/getpass.py", line 69, in unix_getpass
    old = termios.tcgetattr(fd)     # a copy to save
termios.error: (25, 'Inappropriate ioctl for device')

It does train the model but I get the error after it.
Has anyone encountered this before? 
Thanks

Conda env:
# packages in environment at /home/ngroot/anaconda3/envs/llmke:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
absl-py                   2.1.0                    pypi_0    pypi
accelerate                0.26.1                   pypi_0    pypi
aiohttp                   3.8.6                    pypi_0    pypi
aiosignal                 1.3.1                    pypi_0    pypi
alembic                   1.13.1                   pypi_0    pypi
annotated-types           0.6.0                    pypi_0    pypi
appdirs                   1.4.4                    pypi_0    pypi
async-timeout             4.0.3                    pypi_0    pypi
attrs                     23.1.0                   pypi_0    pypi
beautifulsoup4            4.12.2                   pypi_0    pypi
ca-certificates           2023.08.22           h06a4308_0  
cachetools                5.3.2                    pypi_0    pypi
certifi                   2023.7.22                pypi_0    pypi
charset-normalizer        3.3.1                    pypi_0    pypi
click                     8.1.7                    pypi_0    pypi
colorlog                  6.8.0                    pypi_0    pypi
contourpy                 1.1.1                    pypi_0    pypi
cycler                    0.12.1                   pypi_0    pypi
datasets                  2.16.1                   pypi_0    pypi
deepspeed                 0.13.2                   pypi_0    pypi
dill                      0.3.7                    pypi_0    pypi
docker-pycreds            0.4.0                    pypi_0    pypi
filelock                  3.12.4                   pypi_0    pypi
fonttools                 4.43.1                   pypi_0    pypi
frozenlist                1.4.0                    pypi_0    pypi
fsspec                    2023.10.0                pypi_0    pypi
gitdb                     4.0.11                   pypi_0    pypi
gitpython                 3.1.42                   pypi_0    pypi
google-auth               2.26.2                   pypi_0    pypi
google-auth-oauthlib      1.2.0                    pypi_0    pypi
greenlet                  3.0.3                    pypi_0    pypi
grpcio                    1.60.0                   pypi_0    pypi
hjson                     3.1.0                    pypi_0    pypi
huggingface               0.0.1                    pypi_0    pypi
huggingface-hub           0.20.2                   pypi_0    pypi
idna                      3.4                      pypi_0    pypi
importlib-metadata        7.0.1                    pypi_0    pypi
importlib-resources       6.1.0                    pypi_0    pypi
isodate                   0.6.1                    pypi_0    pypi
jinja2                    3.1.2                    pypi_0    pypi
joblib                    1.3.2                    pypi_0    pypi
kiwisolver                1.4.5                    pypi_0    pypi
ld_impl_linux-64          2.38                 h1181459_1  
libffi                    3.4.4                h6a678d5_0  
libgcc-ng                 11.2.0               h1234567_1  
libgomp                   11.2.0               h1234567_1  
libstdcxx-ng              11.2.0               h1234567_1  
mako                      1.3.0                    pypi_0    pypi
markdown                  3.5.2                    pypi_0    pypi
markupsafe                2.1.3                    pypi_0    pypi
matplotlib                3.8.0                    pypi_0    pypi
mpmath                    1.3.0                    pypi_0    pypi
multidict                 6.0.4                    pypi_0    pypi
multiprocess              0.70.15                  pypi_0    pypi
ncurses                   6.4                  h6a678d5_0  
networkx                  3.2                      pypi_0    pypi
ninja                     1.11.1.1                 pypi_0    pypi
nltk                      3.8.1                    pypi_0    pypi
numpy                     1.26.1                   pypi_0    pypi
nvidia-cublas-cu12        12.1.3.1                 pypi_0    pypi
nvidia-cuda-cupti-cu12    12.1.105                 pypi_0    pypi
nvidia-cuda-nvrtc-cu12    12.1.105                 pypi_0    pypi
nvidia-cuda-runtime-cu12  12.1.105                 pypi_0    pypi
nvidia-cudnn-cu12         8.9.2.26                 pypi_0    pypi
nvidia-cufft-cu12         11.0.2.54                pypi_0    pypi
nvidia-curand-cu12        10.3.2.106               pypi_0    pypi
nvidia-cusolver-cu12      11.4.5.107               pypi_0    pypi
nvidia-cusparse-cu12      12.1.0.106               pypi_0    pypi
nvidia-nccl-cu12          2.18.1                   pypi_0    pypi
nvidia-nvjitlink-cu12     12.3.52                  pypi_0    pypi
nvidia-nvtx-cu12          12.1.105                 pypi_0    pypi
oauthlib                  3.2.2                    pypi_0    pypi
openai                    0.28.1                   pypi_0    pypi
openssl                   3.0.11               h7f8727e_2  
optuna                    3.5.0                    pypi_0    pypi
packaging                 23.2                     pypi_0    pypi
pandas                    2.1.1                    pypi_0    pypi
pillow                    10.1.0                   pypi_0    pypi
pip                       23.3             py39h06a4308_0  
prettytable               3.9.0                    pypi_0    pypi
protobuf                  4.23.4                   pypi_0    pypi
psutil                    5.9.7                    pypi_0    pypi
py-cpuinfo                9.0.0                    pypi_0    pypi
pyarrow                   14.0.2                   pypi_0    pypi
pyarrow-hotfix            0.6                      pypi_0    pypi
pyasn1                    0.5.1                    pypi_0    pypi
pyasn1-modules            0.3.0                    pypi_0    pypi
pydantic                  2.6.1                    pypi_0    pypi
pydantic-core             2.16.2                   pypi_0    pypi
pynvml                    11.5.0                   pypi_0    pypi
pyparsing                 3.1.1                    pypi_0    pypi
python                    3.9.18               h955ad1f_0  
python-dateutil           2.8.2                    pypi_0    pypi
pytz                      2023.3.post1             pypi_0    pypi
pyyaml                    6.0.1                    pypi_0    pypi
rdflib                    7.0.0                    pypi_0    pypi
readline                  8.2                  h5eee18b_0  
regex                     2023.10.3                pypi_0    pypi
requests                  2.31.0                   pypi_0    pypi
requests-oauthlib         1.3.1                    pypi_0    pypi
rsa                       4.9                      pypi_0    pypi
safetensors               0.4.2                    pypi_0    pypi
scikit-learn              1.3.2                    pypi_0    pypi
scipy                     1.11.3                   pypi_0    pypi
seaborn                   0.13.0                   pypi_0    pypi
sentence-transformers     2.2.2                    pypi_0    pypi
sentencepiece             0.1.99                   pypi_0    pypi
sentry-sdk                1.40.6                   pypi_0    pypi
setproctitle              1.3.3                    pypi_0    pypi
setuptools                68.0.0           py39h06a4308_0  
six                       1.16.0                   pypi_0    pypi
smmap                     5.0.1                    pypi_0    pypi
soupsieve                 2.5                      pypi_0    pypi
sparqlwrapper             2.0.0                    pypi_0    pypi
sqlalchemy                2.0.25                   pypi_0    pypi
sqlite                    3.41.2               h5eee18b_0  
sympy                     1.12                     pypi_0    pypi
tenacity                  8.2.3                    pypi_0    pypi
tensorboard               2.15.1                   pypi_0    pypi
tensorboard-data-server   0.7.2                    pypi_0    pypi
threadpoolctl             3.2.0                    pypi_0    pypi
tk                        8.6.12               h1ccaba5_0  
tokenizers                0.15.0                   pypi_0    pypi
torch                     2.1.2                    pypi_0    pypi
torchaudio                2.1.0                    pypi_0    pypi
torchvision               0.16.0                   pypi_0    pypi
tqdm                      4.66.1                   pypi_0    pypi
transformers              4.37.2                   pypi_0    pypi
triton                    2.1.0                    pypi_0    pypi
typing-extensions         4.8.0                    pypi_0    pypi
tzdata                    2023.3                   pypi_0    pypi
urllib3                   2.0.7                    pypi_0    pypi
wandb                     0.16.3                   pypi_0    pypi
wcwidth                   0.2.8                    pypi_0    pypi
werkzeug                  3.0.1                    pypi_0    pypi
wget                      3.2                      pypi_0    pypi
wheel                     0.41.2           py39h06a4308_0  
wikipedia                 1.4.0                    pypi_0    pypi
xxhash                    3.4.1                    pypi_0    pypi
xz                        5.4.2                h5eee18b_0  
yarl                      1.9.2                    pypi_0    pypi
zipp                      3.17.0                   pypi_0    pypi
zlib                      1.2.13               h5eee18b_0  


Comments:
Hi @ninagroot, this appears to be an error being trigger from python in the [getpass module](https://docs.python.org/3.9/library/getpass.html) and is not related to the transformers library  

Okay thanks for the quick response