prajdabre / yanmtt

Yet Another Neural Machine Translation Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Train MBART Model: forward() got an unexpected keyword argument 'label_mask'

anhdungitvn opened this issue · comments

Scenario:

  • Run: $ ./examples/train_mbart_model.sh

Error:
TypeError: forward() got an unexpected keyword argument 'label_mask'

image

I'm looking forward to your reply.
Thanks!

Hi,

Are you using the version of transformers provided with this toolkit, or did you install it using "pip install transformers?"

If you used the latter, then you will get this error.

To fix this:

  1. pip uninstall transformers
  2. cd yanmtt/transformers
  3. python setup.py install

Dear Dr. @prajdabre ,

Your answer solved my issue perfectly.

Thank you!