Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
4c6e4295
Unverified
Commit
4c6e4295
authored
Jun 21, 2023
by
Bearnardd
Committed by
GitHub
Jun 21, 2023
Browse files
fix type annotation for debug arg (#24033)
* fix type annotation for debug arg * fix TypeErorr
parent
16c7b16a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/transformers/training_args.py
src/transformers/training_args.py
+4
-1
No files found.
src/transformers/training_args.py
View file @
4c6e4295
...
@@ -873,7 +873,7 @@ class TrainingArguments:
...
@@ -873,7 +873,7 @@ class TrainingArguments:
)
)
},
},
)
)
debug
:
str
=
field
(
debug
:
Union
[
str
,
List
[
DebugOption
]]
=
field
(
default
=
""
,
default
=
""
,
metadata
=
{
metadata
=
{
"help"
:
(
"help"
:
(
...
@@ -1563,8 +1563,11 @@ class TrainingArguments:
...
@@ -1563,8 +1563,11 @@ class TrainingArguments:
)
)
self
.
debug
+=
" tpu_metrics_debug"
self
.
debug
+=
" tpu_metrics_debug"
self
.
tpu_metrics_debug
=
False
self
.
tpu_metrics_debug
=
False
if
isinstance
(
self
.
debug
,
str
):
if
isinstance
(
self
.
debug
,
str
):
self
.
debug
=
[
DebugOption
(
s
)
for
s
in
self
.
debug
.
split
()]
self
.
debug
=
[
DebugOption
(
s
)
for
s
in
self
.
debug
.
split
()]
elif
self
.
debug
is
None
:
self
.
debug
=
[]
self
.
deepspeed_plugin
=
None
self
.
deepspeed_plugin
=
None
if
self
.
deepspeed
:
if
self
.
deepspeed
:
...
...
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