Add an option to reduce compile() console spam (#23938)
* Add an option to reduce compile() console spam * Add annotations to the example scripts * Add notes to the quicktour docs as well * minor fix
This commit is contained in:
@@ -559,8 +559,9 @@ def main():
|
||||
adam_global_clipnorm=training_args.max_grad_norm,
|
||||
)
|
||||
|
||||
# no user-specified loss = will use the model internal loss
|
||||
model.compile(optimizer=optimizer, jit_compile=training_args.xla, run_eagerly=True)
|
||||
# Transformers models compute the right loss for their task by default when labels are passed, and will
|
||||
# use this for training unless you specify your own loss function in compile().
|
||||
model.compile(optimizer=optimizer, jit_compile=training_args.xla)
|
||||
# endregion
|
||||
|
||||
# region Preparing push_to_hub and model card
|
||||
|
||||
Reference in New Issue
Block a user