Unverified Commit 3a107645 authored by Lysandre Debut's avatar Lysandre Debut Committed by GitHub
Browse files

Fix TF training arguments instantiation (#8063)

parent bc9332b5
...@@ -351,7 +351,7 @@ class TrainingArguments: ...@@ -351,7 +351,7 @@ class TrainingArguments:
if self.run_name is None: if self.run_name is None:
self.run_name = self.output_dir self.run_name = self.output_dir
if self.device.type != "cuda" and self.fp16: if is_torch_available() and self.device.type != "cuda" and self.fp16:
raise ValueError("AMP (`--fp16`) can only be used on CUDA devices.") raise ValueError("AMP (`--fp16`) can only be used on CUDA devices.")
@property @property
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment