Closed moooooser999 closed 3 years ago
Yes, that's right. The run_summarization
script does not accept all generate
arguments. Instead, those arguments should be set in the config
. For your use-case, it should easy to modify the script to accept these args and then pass those to config
so generate
can directly access those.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
I am using the summarization code provided in example/pytorch/summarization/run_summarization.py
However, I could not add the argument "repetition_penalty" when generating.
After tracing the source code of Seq2SeqTrainer(), I found that the function
predict()
does not take the argument as input.It might be helpful if the arguments the function takes could be much more flexible. For now, it only takes
max_len
andnum_beams
for the functiongenerate()