Fix TF training arguments instantiation (#8063)
This commit is contained in:
@@ -351,7 +351,7 @@ class TrainingArguments:
|
||||
if self.run_name is None:
|
||||
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.")
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user