Skip to content

Commit

Permalink
Help message for --pad_to_max_length
Browse files Browse the repository at this point in the history
  • Loading branch information
Waino committed May 20, 2024
1 parent e331a39 commit bda983a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mammoth/opts.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,13 @@ def _add_train_general_opts(parser):
choices=["sents", "tokens"],
help="Batch grouping for batch_size. Standard is sents. Tokens will do dynamic batching",
)
group.add('--pad_to_max_length', '-pad_to_max_length', action='store_true')
group.add(
'--pad_to_max_length',
'-pad_to_max_length',
action='store_true',
help='Pad all minibatches to max_length instead of to the length of the longest sequence in the minibatch. '
'Using this together with batch_type=sents results in tensors of a fixed shape.'
)
group.add('--max_length', '-max_length', type=int, default=None, help='Maximum sequence length.')
group.add(
'--task_distribution_strategy',
Expand Down

0 comments on commit bda983a

Please sign in to comment.