"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e770f0316d2a9b787c9d1440f204fcb65e176682"
Unverified Commit 14ee2326 authored by Ricardo's avatar Ricardo Committed by GitHub
Browse files

fix: warmup_steps check for training_args (#32236)

parent 53f0c9c2
...@@ -1816,8 +1816,8 @@ class TrainingArguments: ...@@ -1816,8 +1816,8 @@ class TrainingArguments:
" during training" " during training"
) )
if not isinstance(self.warmup_steps, int) or self.warmup_steps < 0 or 0 < self.warmup_steps <= 1: if not isinstance(self.warmup_steps, int) or self.warmup_steps < 0:
raise ValueError("warmup_steps must be either 0 or > 1") raise ValueError("warmup_steps must be of type int and must be 0 or a positive integer.")
if isinstance(self.fsdp, bool): if isinstance(self.fsdp, bool):
self.fsdp = [FSDPOption.FULL_SHARD] if self.fsdp else "" self.fsdp = [FSDPOption.FULL_SHARD] if self.fsdp else ""
......
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