Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/tensorflow/contrastive-image-text/run_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,8 @@ def main():
handlers=[logging.StreamHandler(sys.stdout)],
)

if training_args.should_log:
# The default of training_args.log_level is passive, so we set log level at info here to have that default.
transformers.utils.logging.set_verbosity_info()
# The default of training_args.log_level is passive, so we set log level at info here to have that default.
transformers.utils.logging.set_verbosity_info()

log_level = training_args.get_process_log_level()
logger.setLevel(log_level)
Expand Down
7 changes: 7 additions & 0 deletions src/transformers/training_args_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ def n_replicas(self) -> int:
requires_backends(self, ["tf"])
return self._setup_strategy.num_replicas_in_sync

@property
def should_log(self):
"""
Whether or not the current process should produce log.
"""
return False # TF Logging is handled by Keras not the Trainer

@property
def train_batch_size(self) -> int:
"""
Expand Down