Closed davisliang closed 3 years ago
Thanks for reporting the error, the fix is tracked in https://github.com/dmlc/gluon-nlp/pull/1572
@davisliang Would you try the latest master again? It should have been fixed.
I tried the latest master branch and can verify the fix works and the conversion script runs successfully. Thank you for the help!
Description
When running the script convert_xlmr.sh we encounter an error in the final conversion step referencing a key error.
Error Message
Traceback (most recent call last): File "convert_fairseq_xlmr.py", line 120, in <module> convert_fairseq_model(args) File "convert_fairseq_xlmr.py", line 99, in convert_fairseq_model ctx) File "/home/ubuntu/gluon-nlp/scripts/conversion_toolkits/convert_fairseq_roberta.py", line 230, in convert_params fairseq_params[fs_name].cpu().numpy()) KeyError: 'model.encoder.sentence_encoder.emb_layer_norm.weight'
To Reproduce
Install the following packages and run the conversion script gluonnlp 1.0.0.dev20210513 mxnet-cu110 2.0.0a0 torch 1.8.1 fairseq 1.0.0a0+d151f27
Steps to reproduce
(Paste the commands you ran that produced the error.)
cd /path/to/gluon-nlp/scripts/conversion_toolkits
bash convert_xlmr.sh
What have you tried to solve it?
Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below: