fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

Can't set `--left-pad-source=False` during run of `fairseq-train`

Open offendo opened this issue 1 year ago • 0 comments

🐛 Bug

When I run a fairseq-train command with --left-pad-source=False I get the following error:

fairseq-train: error: argument --left-pad-source: ignored explicit argument 'False'

Not exactly sure why it's not letting me do that. Any help would be appreciated.

For now I've edited the source code and forced it to be right padded, but that's obviously not a proper solution.

To Reproduce

Download your favorite dataset and run training. I was doing WMT14 with a following minimal command

fairseq-train data-bin/wmt14_en_de --arch transformer_wmt_en_de --left-pad-source=False

Expected behavior

It should simply toggle the flag and disable left padding for the source.

Environment

  • fairseq Version (e.g., 1.0 or main): 0.12.2
  • PyTorch Version (e.g., 1.0) 2.0
  • OS (e.g., Linux): Linux
  • How you installed fairseq (pip, source): pip
  • Python version: 3.9

offendo avatar Apr 13 '23 05:04 offendo