Stop requiring Torch for our TF examples! (#21997)
* Stop requiring Torch for our TF examples! * Slight tweak to logging in the example itself
This commit is contained in:
@@ -273,7 +273,6 @@ 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()
|
||||
|
||||
|
||||
@@ -249,6 +249,13 @@ class TFTrainingArguments(TrainingArguments):
|
||||
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:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user