fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

Support for Python 3.11

Open thyripian opened this issue 2 years ago • 2 comments

🐛 Bug

Making recommended modifications to config.py from separate issue to allow 3.11 compatibility break fairseq and or runtime compatibility with hydra.

Windows 10 machine, Python 3.11.3, fairseq==0.12.2, omegaconf==2.0.6, hydra-core==1.0.7, running LASER3 embed models and nllb-200-distilled-600M.

Steps to reproduce the behavior (always include the command you ran):

  1. Run cmd './embed.sh [inp_file] [out_file] gle_Latn'
  2. See error

Traceback in attached image

Expected behavior

Expected process to run as intended.

Environment

  • fairseq Version (e.g., 1.0 or main): 0.12.2
  • PyTorch Version (e.g., 1.0): 2.0.1
  • OS (e.g., Linux): Windows 10
  • How you installed fairseq (pip, source): git clone, pip install --editable
  • Build command you used (if compiling from source): python setup.py build develop
  • Python version: 3.11.3
  • CUDA/cuDNN version: n/a
  • GPU models and configuration: n/a
  • Any other relevant information: I've been trying to figure this out since Friday (6/2/2023). Please help. I'd like to get some kind of progress by the end of the day tomorrow.

fairseq_error_traceback

thyripian avatar Jun 05 '23 02:06 thyripian

Maybe this can fix this issue.

#5359

majiayu000 avatar Oct 25 '23 09:10 majiayu000

Issue still present. Got it on windows 11 with environment conda create -n test_env python=3.11.8 anaconda:

Installing collected packages: tbb, sentencepiece, intel-openmp, bitarray, antlr4-python3-runtime, unicategories, portalocker, omegaconf, mkl, cython, torch, sacremoses, sacrebleu, hydra-core, torchaudio, fairseq, laser_encoders Successfully installed antlr4-python3-runtime-4.8 bitarray-2.9.2 cython-3.0.10 fairseq-0.12.2 hydra-core-1.0.7 intel-openmp-2021.4.0 laser_encoders-0.0.1 mkl-2021.4.0 omegaconf-2.0.6 portalocker-2.8.2 sacrebleu-2.4.2 sacremoses-0.1.0 sentencepiece-0.2.0 tbb-2021.12.0 torch-2.3.0 torchaudio-2.3.0 unicategories-0.1.2

Got around by switching to python version 3.9 conda create -n test_env_3_9 python=3.9 anaconda and everything works fine.

TheHappyLemon avatar Apr 25 '24 10:04 TheHappyLemon