diff --git a/examples/tensorflow/contrastive-image-text/run_clip.py b/examples/tensorflow/contrastive-image-text/run_clip.py index 7f153ce75a6f..9dad78eb163b 100644 --- a/examples/tensorflow/contrastive-image-text/run_clip.py +++ b/examples/tensorflow/contrastive-image-text/run_clip.py @@ -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) diff --git a/src/transformers/training_args_tf.py b/src/transformers/training_args_tf.py index 3cacfba16e8f..847bbdb78a15 100644 --- a/src/transformers/training_args_tf.py +++ b/src/transformers/training_args_tf.py @@ -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: """