mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Fix TF training arguments instantiation (#8063)
This commit is contained in:
parent
bc9332b545
commit
3a10764574
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user