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
700ccf6e
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "78f79ef67062884ef85efeb055b11b5dfc529676"
Unverified
Commit
700ccf6e
authored
Apr 10, 2020
by
Jin Young Sohn
Committed by
GitHub
Apr 10, 2020
Browse files
Fix glue_convert_examples_to_features API breakage (#3742)
parent
b7cf9f43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
examples/run_tpu_glue.py
examples/run_tpu_glue.py
+1
-8
No files found.
examples/run_tpu_glue.py
View file @
700ccf6e
...
...
@@ -329,14 +329,7 @@ def load_and_cache_examples(args, task, tokenizer, evaluate=False):
processor
.
get_dev_examples
(
args
.
data_dir
)
if
evaluate
else
processor
.
get_train_examples
(
args
.
data_dir
)
)
features
=
convert_examples_to_features
(
examples
,
tokenizer
,
label_list
=
label_list
,
max_length
=
args
.
max_seq_length
,
output_mode
=
output_mode
,
pad_on_left
=
bool
(
args
.
model_type
in
[
"xlnet"
]),
# pad on the left for xlnet
pad_token
=
tokenizer
.
convert_tokens_to_ids
([
tokenizer
.
pad_token
])[
0
],
pad_token_segment_id
=
4
if
args
.
model_type
in
[
"xlnet"
]
else
0
,
examples
,
tokenizer
,
max_length
=
args
.
max_seq_length
,
label_list
=
label_list
,
output_mode
=
output_mode
,
)
logger
.
info
(
"Saving features into cached file %s"
,
cached_features_file
)
torch
.
save
(
features
,
cached_features_file
)
...
...
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