facebookresearch/fairseq

ModuleNotFoundError: No module named 'fairseq.criterions.'

Opened this issue ยท 2 comments

๐Ÿ› Bug

I am very confused about the error caused by the environment. There is no error reported after run the required command "pip install -e ."

image

and "python setup.py build develop"

image

However, I got the error below when I generated the bin file using preprocess.py

image

I am not sure what the problem is since I never encountered such a problem before.

Environment

  • fairseq Version (e.g., 1.0 or main): 0.10.2
  • PyTorch Version: 1.12.1
  • OS (e.g., Linux):
  • How you installed fairseq (pip, source): pip install -e .
  • Build command you used (if compiling from source): there is no any errors after run 'pip install -e .' and 'python setup.py build develop'
  • Python version: 3.8
  • CUDA/cuDNN version: 11.3
image

Has anybody met this issue before?

@libeineu if you upgrade fairseq to 0.12.2, it should probably fix the error, the criterions submodule is present in that version.