better logging and help (#9203)
This commit is contained in:
@@ -98,6 +98,7 @@ class DataTrainingArguments:
|
|||||||
metadata={
|
metadata={
|
||||||
"help": "The maximum total sequence length for validation target text after tokenization. Sequences longer "
|
"help": "The maximum total sequence length for validation target text after tokenization. Sequences longer "
|
||||||
"than this will be truncated, sequences shorter will be padded."
|
"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(
|
test_max_target_length: Optional[int] = field(
|
||||||
|
|||||||
@@ -434,7 +434,8 @@ def use_task_specific_params(model, task):
|
|||||||
|
|
||||||
if task_specific_params is not None:
|
if task_specific_params is not None:
|
||||||
pars = task_specific_params.get(task, {})
|
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)
|
model.config.update(pars)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user