Skip to content

Commit

Permalink
fix: warmup_steps check for training_args (#32236)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo-L-C authored Jul 31, 2024
1 parent 53f0c9c commit 14ee232
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,8 +1816,8 @@ def __post_init__(self):
" during training"
)

if not isinstance(self.warmup_steps, int) or self.warmup_steps < 0 or 0 < self.warmup_steps <= 1:
raise ValueError("warmup_steps must be either 0 or > 1")
if not isinstance(self.warmup_steps, int) or self.warmup_steps < 0:
raise ValueError("warmup_steps must be of type int and must be 0 or a positive integer.")

if isinstance(self.fsdp, bool):
self.fsdp = [FSDPOption.FULL_SHARD] if self.fsdp else ""
Expand Down

0 comments on commit 14ee232

Please sign in to comment.