mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Make logs tf compliant (#9565)
This commit is contained in:
parent
14d677ca4a
commit
a26536f0c8
@ -285,7 +285,7 @@ def booleans_processing(config, **kwargs):
|
||||
or kwargs["output_hidden_states"] is not None
|
||||
or ("use_cache" in kwargs and kwargs["use_cache"] is not None)
|
||||
):
|
||||
logger.warning(
|
||||
tf.print(
|
||||
"The parameters `output_attentions`, `output_hidden_states` and `use_cache` cannot be updated when calling a model."
|
||||
"They have to be set to True/False in the config object (i.e.: `config=XConfig.from_pretrained('name', output_attentions=True)`)."
|
||||
)
|
||||
@ -294,7 +294,7 @@ def booleans_processing(config, **kwargs):
|
||||
final_booleans["output_hidden_states"] = config.output_hidden_states
|
||||
|
||||
if kwargs["return_dict"] is not None:
|
||||
logger.warning("The parameter `return_dict` cannot be set in graph mode and will always be set to `True`.")
|
||||
tf.print("The parameter `return_dict` cannot be set in graph mode and will always be set to `True`.")
|
||||
final_booleans["return_dict"] = True
|
||||
|
||||
if "use_cache" in kwargs:
|
||||
|
Loading…
Reference in New Issue
Block a user