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
e99071f1
Unverified
Commit
e99071f1
authored
Nov 05, 2019
by
Thomas Wolf
Committed by
GitHub
Nov 05, 2019
Browse files
Merge pull request #1734 from orena1/patch-1
add progress bar to convert_examples_to_features
parents
ba973342
d7906165
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
examples/utils_squad.py
examples/utils_squad.py
+2
-1
No files found.
examples/utils_squad.py
View file @
e99071f1
...
...
@@ -23,6 +23,7 @@ import logging
import
math
import
collections
from
io
import
open
from
tqdm
import
tqdm
from
transformers.tokenization_bert
import
BasicTokenizer
,
whitespace_tokenize
...
...
@@ -202,7 +203,7 @@ def convert_examples_to_features(examples, tokenizer, max_seq_length,
# f = np.zeros((max_N, max_M), dtype=np.float32)
features
=
[]
for
(
example_index
,
example
)
in
enumerate
(
examples
):
for
(
example_index
,
example
)
in
enumerate
(
tqdm
(
examples
)
)
:
# if example_index % 100 == 0:
# logger.info('Converting %s/%s pos %s neg %s', example_index, len(examples), cnt_pos, cnt_neg)
...
...
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