python3 -m pytest tests/
===================================================== test session starts =====================================================
platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.5.0
rootdir: /home/dvrogozh/git/huggingface/transformers
configfile: pyproject.toml
plugins: anyio-4.8.0, rich-0.2.0, subtests-0.14.1, xdist-3.6.1, asyncio-0.23.8, timeout-2.3.1, hypothesis-6.122.3, reportlog-0.4.0, dash-2.18.2, cov-6.0.0, typeguard-4.3.0
asyncio: mode=strict
collected 84774 items / 1 error
=========================================================== ERRORS ============================================================
________________________________ ERROR collecting tests/models/marian/test_modeling_marian.py _________________________________
ImportError while importing test module '/home/dvrogozh/git/huggingface/transformers/tests/models/marian/test_modeling_marian.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/models/marian/test_modeling_marian.py:50: in <module>
from transformers.models.marian.convert_marian_to_pytorch import (
E ModuleNotFoundError: No module named 'transformers.models.marian.convert_marian_to_pytorch'
====================================================== warnings summary =======================================================
src/transformers/optimization.py:640
/home/dvrogozh/git/huggingface/transformers/src/transformers/optimization.py:640: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================================== short test summary info ===================================================
ERROR tests/models/marian/test_modeling_marian.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================ 1 warning, 1 error in 17.54s =================================================
Tests collection fails with the following error in https://github.com/huggingface/transformers/tree/v4.49-release branch (and for v4.48-release branch too).
This happens due to some files are being pruned on release creation commit, see a22a437. Can we resolve this issue to be able to trigger all the tests on release branches?
CC: @ArthurZucker @ydshieh