facebookresearch / fairseq

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

/private/home/changhan/ ... config not found #5414

Open nguyenvulong opened 9 months ago

nguyenvulong commented 9 months ago

🐛 Bug

I think there are an issue with the checkpoint just like this bug https://github.com/facebookresearch/fairseq/issues/3224. Models downloaded from: https://github.com/facebookresearch/fairseq/tree/main/examples/wav2vec/xlsr

To Reproduce

  1. Run code
        cp_path = os.path.join(BASE_DIR,'pretrained/xls_r_300m_21_en.pt') # this one DID NOT work
        model, cfg, task = fairseq.checkpoint_utils.load_model_ensemble_and_task([cp_path])
        self.model = model[0]

However, this one worked just fine cp_path = os.path.join(BASE_DIR,'pretrained/xlsr2_300m.pt')

  1. See error
 model, cfg, task = fairseq.checkpoint_utils.load_model_ensemble_and_task([cp_path])
...
raise FileNotFoundError(f"{yaml_path.as_posix()} not found")
FileNotFoundError: /private/home/changhan/data/datasets/speech/common_voice_20191210/xlst/acl/m2e/cfg.yaml not found

Expected behavior

the model should be loaded

Additional context

I think this bug would happen to several models (the one I tested is one of them), configuration created by username changhan