mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 02:31:11 +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:
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user