Skip to content

Commit

Permalink
better logging and help (huggingface#9203)
Browse files Browse the repository at this point in the history
  • Loading branch information
stas00 authored and guyrosin committed Jan 15, 2021
1 parent 7d7783b commit 29fd849
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/seq2seq/finetune_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class DataTrainingArguments:
metadata={
"help": "The maximum total sequence length for validation target text after tokenization. Sequences longer "
"than this will be truncated, sequences shorter will be padded."
" This argument is also used to override the ``max_length`` param of ``model.generate``, which is used during ``evaluate`` and ``predict``"
},
)
test_max_target_length: Optional[int] = field(
Expand Down
3 changes: 2 additions & 1 deletion examples/seq2seq/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ def use_task_specific_params(model, task):

if task_specific_params is not None:
pars = task_specific_params.get(task, {})
logger.info(f"using task specific params for {task}: {pars}")
logger.info(f"setting model.config to task specific params for {task}:\n {pars}")
logger.info("note: command line args may override some of these")
model.config.update(pars)


Expand Down

0 comments on commit 29fd849

Please sign in to comment.