Fairseq pytorch error

Vivek_Tyagi1: <p>Dear PyTorch community members,</p>
<p>I’m writing to you with a request to help me with the error I’m running into while trying to run speech recognition model training on Librispeech dataset using fairseq PyTorch.</p>
<aside class="onebox githubfolder" data-onebox-src="https://github.com/facebookresearch/fairseq/tree/main/examples/speech_recognition">
  <header class="source">
      <img src="https://github.githubassets.com/favicons/favicon.svg" class="site-icon" width="32" height="32">

      <a href="https://github.com/facebookresearch/fairseq/tree/main/examples/speech_recognition" target="_blank" rel="noopener nofollow ugc">github.com</a>
  </header>

  <article class="onebox-body">
    <h3><a href="https://github.com/facebookresearch/fairseq/tree/main/examples/speech_recognition" target="_blank" rel="noopener nofollow ugc">fairseq/examples/speech_recognition at main · facebookresearch/fairseq</a></h3>

  <p><a href="https://github.com/facebookresearch/fairseq/tree/main/examples/speech_recognition" target="_blank" rel="noopener nofollow ugc">main/examples/speech_recognition</a></p>

  <p><span class="label1">Facebook AI Research Sequence-to-Sequence Toolkit written in Python.</span></p>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>So i did the following,</p>
<p>git clone <a href="https://github.com/pytorch/fairseq" class="inline-onebox" rel="noopener nofollow ugc">GitHub - facebookresearch/fairseq: Facebook AI Research Sequence-to-Sequence Toolkit written in Python.</a><br>
cd fairseq<br>
pip install --editable ./</p>
<h1><a name="this-command-runs-okay-1" class="anchor" href="#this-command-runs-okay-1"></a>this command runs okay</h1>
<p>./examples/speech_recognition/datasets/prepare-librispeech.sh Libri_processed_data Libri_raw_data</p>
<h1><a name="then-i-run-this-command-and-it-throws-the-following-error-2" class="anchor" href="#then-i-run-this-command-and-it-throws-the-following-error-2"></a>then I run this command and it throws the following error</h1>
<p>python train.py Libri_processed_data  --save-dir Libri_model --max-epoch 80 --task speech_recognition --arch vggtransformer_2 --optimizer adadelta --lr 1.0 --adadelta-eps 1e-8 --adadelta-rho 0.95 --clip-norm 10.0  --max-tokens 5000 --log-format json --log-interval 1 --criterion cross_entropy_acc --user-dir examples/speech_recognition/</p>
<p>base) vivek@vivek-deeplearning:~/fairseq$ pwd<br>
/home/vivek/fairseq<br>
(base) vivek@vivek-deeplearning:~/fairseq$ python train.py Libri_processed_data  --save-dir Libri_model --max-epoch 80 --task speech_recognition --arch vggtransformer_2 --optimizer adadelta --lr 1.0 --adadelta-eps 1e-8 --adadelta-rho 0.95 --clip-norm 10.0  --max-tokens 5000 --log-format json --log-interval 1 --criterion cross_entropy_acc --user-dir examples/speech_recognition/<br>
2023-07-03 19:34:48 | INFO | fairseq.tasks.text_to_speech | Please install tensorboardX: pip install tensorboardX<br>
Traceback (most recent call last):<br>
File “/home/vivek/fairseq/train.py”, line 14, in <br>
cli_main()<br>
File “/home/vivek/fairseq/fairseq_cli/train.py”, line 558, in cli_main<br>
parser = options.get_training_parser()<br>
File “/home/vivek/fairseq/fairseq/options.py”, line 38, in get_training_parser<br>
parser = get_parser(“Trainer”, default_task)<br>
File “/home/vivek/fairseq/fairseq/options.py”, line 234, in get_parser<br>
utils.import_user_module(usr_args)<br>
File “/home/vivek/fairseq/fairseq/utils.py”, line 503, in import_user_module<br>
import_models(models_path, f"{module_name}.models")<br>
File “/home/vivek/fairseq/fairseq/models/<strong>init</strong>.py”, line 218, in import_models<br>
importlib.import_module(namespace + “.” + model_name)<br>
File “/home/vivek/anaconda3/lib/python3.10/importlib/<strong>init</strong>.py”, line 126, in import_module<br>
return _bootstrap._gcd_import(name[level:], package, level)<br>
File “”, line 1050, in _gcd_import<br>
File “”, line 1027, in _find_and_load<br>
File “”, line 1006, in _find_and_load_unlocked<br>
File “”, line 688, in _load_unlocked<br>
File “”, line 883, in exec_module<br>
File “”, line 241, in _call_with_frames_removed<br>
File “/home/vivek/fairseq/examples/speech_recognition/models/w2l_conv_glu_enc.py”, line 174, in <br>
def w2l_conv_glu_enc(args):<br>
File “/home/vivek/fairseq/fairseq/models/<strong>init</strong>.py”, line 193, in register_model_arch_fn<br>
raise ValueError(<br>
ValueError: Cannot register duplicate model architecture (w2l_conv_glu_enc)</p>
<p>I have opened a bug ticket on fairseq and it’s been 5 days and no one has responded.</p>
<p>May I please request you to kindly help me fix this bug and please point me to my mistake.</p>
<p>Kind regards<br>
Vivek</p>