Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
14ee2326
Unverified
Commit
14ee2326
authored
Aug 01, 2024
by
Ricardo
Committed by
GitHub
Jul 31, 2024
Browse files
fix: warmup_steps check for training_args (#32236)
parent
53f0c9c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/training_args.py
src/transformers/training_args.py
+2
-2
No files found.
src/transformers/training_args.py
View file @
14ee2326
...
...
@@ -1816,8 +1816,8 @@ class TrainingArguments:
" 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
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment