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
1c62e87b
Commit
1c62e87b
authored
Dec 22, 2019
by
Aymeric Augustin
Browse files
Use built-in open().
On Python 3, `open is io.open`.
parent
d6eaf4e6
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
0 additions
and
9 deletions
+0
-9
templates/adding_a_new_model/tests/test_tokenization_xxx.py
templates/adding_a_new_model/tests/test_tokenization_xxx.py
+0
-1
templates/adding_a_new_model/tokenization_xxx.py
templates/adding_a_new_model/tokenization_xxx.py
+0
-1
tests/test_tokenization_bert.py
tests/test_tokenization_bert.py
+0
-1
tests/test_tokenization_bert_japanese.py
tests/test_tokenization_bert_japanese.py
+0
-1
tests/test_tokenization_common.py
tests/test_tokenization_common.py
+0
-1
tests/test_tokenization_ctrl.py
tests/test_tokenization_ctrl.py
+0
-1
tests/test_tokenization_gpt2.py
tests/test_tokenization_gpt2.py
+0
-1
tests/test_tokenization_roberta.py
tests/test_tokenization_roberta.py
+0
-1
tests/test_tokenization_transfo_xl.py
tests/test_tokenization_transfo_xl.py
+0
-1
No files found.
templates/adding_a_new_model/tests/test_tokenization_xxx.py
View file @
1c62e87b
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
import
os
import
os
import
unittest
import
unittest
from
io
import
open
from
transformers.tokenization_bert
import
VOCAB_FILES_NAMES
,
XxxTokenizer
from
transformers.tokenization_bert
import
VOCAB_FILES_NAMES
,
XxxTokenizer
...
...
templates/adding_a_new_model/tokenization_xxx.py
View file @
1c62e87b
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
import
collections
import
collections
import
logging
import
logging
import
os
import
os
from
io
import
open
from
.tokenization_utils
import
PreTrainedTokenizer
from
.tokenization_utils
import
PreTrainedTokenizer
...
...
tests/test_tokenization_bert.py
View file @
1c62e87b
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
import
os
import
os
import
unittest
import
unittest
from
io
import
open
from
transformers.tokenization_bert
import
(
from
transformers.tokenization_bert
import
(
VOCAB_FILES_NAMES
,
VOCAB_FILES_NAMES
,
...
...
tests/test_tokenization_bert_japanese.py
View file @
1c62e87b
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
import
os
import
os
import
unittest
import
unittest
from
io
import
open
from
transformers.tokenization_bert
import
WordpieceTokenizer
from
transformers.tokenization_bert
import
WordpieceTokenizer
from
transformers.tokenization_bert_japanese
import
(
from
transformers.tokenization_bert_japanese
import
(
...
...
tests/test_tokenization_common.py
View file @
1c62e87b
...
@@ -18,7 +18,6 @@ import os
...
@@ -18,7 +18,6 @@ import os
import
pickle
import
pickle
import
shutil
import
shutil
import
tempfile
import
tempfile
from
io
import
open
class
TokenizerTesterMixin
:
class
TokenizerTesterMixin
:
...
...
tests/test_tokenization_ctrl.py
View file @
1c62e87b
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
import
json
import
json
import
os
import
os
import
unittest
import
unittest
from
io
import
open
from
transformers.tokenization_ctrl
import
VOCAB_FILES_NAMES
,
CTRLTokenizer
from
transformers.tokenization_ctrl
import
VOCAB_FILES_NAMES
,
CTRLTokenizer
...
...
tests/test_tokenization_gpt2.py
View file @
1c62e87b
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
import
json
import
json
import
os
import
os
import
unittest
import
unittest
from
io
import
open
from
transformers.tokenization_gpt2
import
VOCAB_FILES_NAMES
,
GPT2Tokenizer
from
transformers.tokenization_gpt2
import
VOCAB_FILES_NAMES
,
GPT2Tokenizer
...
...
tests/test_tokenization_roberta.py
View file @
1c62e87b
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
import
json
import
json
import
os
import
os
import
unittest
import
unittest
from
io
import
open
from
transformers.tokenization_roberta
import
VOCAB_FILES_NAMES
,
RobertaTokenizer
from
transformers.tokenization_roberta
import
VOCAB_FILES_NAMES
,
RobertaTokenizer
...
...
tests/test_tokenization_transfo_xl.py
View file @
1c62e87b
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
import
os
import
os
import
unittest
import
unittest
from
io
import
open
from
transformers
import
is_torch_available
from
transformers
import
is_torch_available
...
...
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