facebookresearch / fairseq

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
MIT License
29.78k stars 6.3k forks source link

DEPRECATION: omegaconf 2.0.6 has a non-standard dependency specifier PyYAML>=5.1.*. pip 24.0 will enforce #5436

Open xvdp opened 5 months ago

xvdp commented 5 months ago

🐛 Bug

Installing fairseq pops a deprecation notice related to its requirements.

DEPRECATION: omegaconf 2.0.6 has a non-standard dependency specifier PyYAML>=5.1.*. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of omegaconf or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063

To Reproduce

git clone https://github.com/facebookresearch/fairseq pip install --no-cache-dir fairseq/.

The dependency bug is fixed in version 2.1.1 - but fairseq requires "omegaconf<2.1" in setup.py https://github.com/omry/omegaconf/issues/1107

Environment

MrGranddy commented 2 months ago

It seems like this problem is here to stay when you try to install from source, one thing that seemingly worked for me is removing the versioning of:

"hydra-core" and "omegaconf" from "setup.py", "install_requires" list. Yet of course I do not know if this breaks things, those version limitations seem oddly specific, at least I can say it finished building and installing without any error.

i.e.

replace 179-193 with:

        install_requires=[
            "cffi",
            "cython",
            "hydra-core",
            "omegaconf",
            "numpy>=1.21.3",
            "regex",
            "sacrebleu>=1.4.12",
            "torch>=1.13",
            "tqdm",
            "bitarray",
            "torchaudio>=0.8.0",
            "scikit-learn",
            "packaging",
        ],
den3asphalt commented 3 weeks ago

I have the same problem. There doesn't seem to be an immediate problem, but I would like an update.

rsxdalv commented 1 week ago

This very easily breaks docker builds where you are going to have the newer pip by default. I honestly wish there was a fairseq fork that actually resolved the omegaconf, hydra-core, missing wheels and other problems.