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
96881729
Commit
96881729
authored
Jan 13, 2022
by
Sylvain Gugger
Browse files
Remove assert on optional arg
parent
1eb40338
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
examples/pytorch/summarization/run_summarization.py
examples/pytorch/summarization/run_summarization.py
+0
-3
No files found.
examples/pytorch/summarization/run_summarization.py
View file @
96881729
...
...
@@ -241,9 +241,6 @@ class DataTrainingArguments:
def
__post_init__
(
self
):
if
self
.
dataset_name
is
None
and
self
.
train_file
is
None
and
self
.
validation_file
is
None
:
raise
ValueError
(
"Need either a dataset name or a training/validation file."
)
elif
self
.
lang
is
None
:
raise
ValueError
(
"Need to specify the language."
)
else
:
if
self
.
train_file
is
not
None
:
extension
=
self
.
train_file
.
split
(
"."
)[
-
1
]
...
...
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