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
bca0dd5e
"ts/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "acb627cfe6e1426c220ae975882ae55796ec2f1d"
Unverified
Commit
bca0dd5e
authored
Feb 03, 2021
by
Suraj Patil
Committed by
GitHub
Feb 03, 2021
Browse files
[run_clm.py] fix getting extention
parent
5442a11f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
examples/language-modeling/run_clm.py
examples/language-modeling/run_clm.py
+5
-1
No files found.
examples/language-modeling/run_clm.py
View file @
bca0dd5e
...
@@ -227,7 +227,11 @@ def main():
...
@@ -227,7 +227,11 @@ def main():
data_files
[
"train"
]
=
data_args
.
train_file
data_files
[
"train"
]
=
data_args
.
train_file
if
data_args
.
validation_file
is
not
None
:
if
data_args
.
validation_file
is
not
None
:
data_files
[
"validation"
]
=
data_args
.
validation_file
data_files
[
"validation"
]
=
data_args
.
validation_file
extension
=
data_args
.
train_file
.
split
(
"."
)[
-
1
]
extension
=
(
data_args
.
train_file
.
split
(
"."
)[
-
1
]
if
data_args
.
train_file
is
not
None
else
data_args
.
validation_file
.
split
(
"."
)[
-
1
]
)
if
extension
==
"txt"
:
if
extension
==
"txt"
:
extension
=
"text"
extension
=
"text"
datasets
=
load_dataset
(
extension
,
data_files
=
data_files
)
datasets
=
load_dataset
(
extension
,
data_files
=
data_files
)
...
...
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