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
39fa4009
"docs/git@developer.sourcefind.cn:zhaoyu6/sglang.git" did not exist on "4746aaea41c7b9b3ad7202eb80c4370d17789ab3"
Unverified
Commit
39fa4009
authored
Jan 29, 2024
by
Klaus Hipp
Committed by
GitHub
Jan 29, 2024
Browse files
Fix input data file extension in examples (#28741)
parent
5649c0cb
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
examples/tensorflow/multiple-choice/run_swag.py
examples/tensorflow/multiple-choice/run_swag.py
+2
-1
examples/tensorflow/token-classification/run_ner.py
examples/tensorflow/token-classification/run_ner.py
+2
-1
templates/adding_a_new_example_script/{{cookiecutter.directory_name}}/run_{{cookiecutter.example_shortcut}}.py
...directory_name}}/run_{{cookiecutter.example_shortcut}}.py
+2
-1
No files found.
examples/tensorflow/multiple-choice/run_swag.py
View file @
39fa4009
...
...
@@ -320,9 +320,10 @@ def main():
data_files
=
{}
if
data_args
.
train_file
is
not
None
:
data_files
[
"train"
]
=
data_args
.
train_file
extension
=
data_args
.
train_file
.
split
(
"."
)[
-
1
]
if
data_args
.
validation_file
is
not
None
:
data_files
[
"validation"
]
=
data_args
.
validation_file
extension
=
data_args
.
trai
n_file
.
split
(
"."
)[
-
1
]
extension
=
data_args
.
validatio
n_file
.
split
(
"."
)[
-
1
]
raw_datasets
=
load_dataset
(
extension
,
data_files
=
data_files
,
...
...
examples/tensorflow/token-classification/run_ner.py
View file @
39fa4009
...
...
@@ -260,9 +260,10 @@ def main():
data_files
=
{}
if
data_args
.
train_file
is
not
None
:
data_files
[
"train"
]
=
data_args
.
train_file
extension
=
data_args
.
train_file
.
split
(
"."
)[
-
1
]
if
data_args
.
validation_file
is
not
None
:
data_files
[
"validation"
]
=
data_args
.
validation_file
extension
=
data_args
.
trai
n_file
.
split
(
"."
)[
-
1
]
extension
=
data_args
.
validatio
n_file
.
split
(
"."
)[
-
1
]
raw_datasets
=
load_dataset
(
extension
,
data_files
=
data_files
,
...
...
templates/adding_a_new_example_script/{{cookiecutter.directory_name}}/run_{{cookiecutter.example_shortcut}}.py
View file @
39fa4009
...
...
@@ -730,9 +730,10 @@ def main():
data_files
=
{}
if
args
.
train_file
is
not
None
:
data_files
[
"train"
]
=
args
.
train_file
extension
=
args
.
train_file
.
split
(
"."
)[
-
1
]
if
args
.
validation_file
is
not
None
:
data_files
[
"validation"
]
=
args
.
validation_file
extension
=
args
.
trai
n_file
.
split
(
"."
)[
-
1
]
extension
=
args
.
validatio
n_file
.
split
(
"."
)[
-
1
]
raw_datasets
=
load_dataset
(
extension
,
data_files
=
data_files
)
# See more about loading any type of standard or custom dataset (from files, python dict, pandas DataFrame, etc) at
# https://huggingface.co/docs/datasets/loading_datasets.
...
...
Prev
1
2
Next
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