Use built-in open().

On Python 3, `open is io.open`.
This commit is contained in:
Aymeric Augustin 2019-12-22 18:26:42 +01:00
parent d6eaf4e6d2
commit 1c62e87b34
29 changed files with 0 additions and 29 deletions

View File

@ -21,7 +21,6 @@ import glob
import json
import logging
import os
from io import open
from typing import List
import tqdm

View File

@ -18,7 +18,6 @@
import logging
import os
from io import open
logger = logging.getLogger(__name__)

View File

@ -33,7 +33,6 @@ To create the package for pypi.
7. Copy the release notes from RELEASE.md to the tag in github once everything is looking hunky-dory.
"""
from io import open
from setuptools import find_packages, setup

View File

@ -20,7 +20,6 @@ import copy
import json
import logging
import os
from io import open
from .file_utils import CONFIG_NAME, cached_path, hf_bucket_url, is_remote_url

View File

@ -17,7 +17,6 @@
import argparse
import logging
from io import open
import torch

View File

@ -17,7 +17,6 @@
import argparse
import logging
from io import open
import torch

View File

@ -20,7 +20,6 @@ import logging
import os
import pickle
import sys
from io import open
import torch

View File

@ -18,7 +18,6 @@
import argparse
import json
import logging
from io import open
import numpy
import torch

View File

@ -14,7 +14,6 @@ import logging
import math
import re
import string
from io import open
from transformers.tokenization_bert import BasicTokenizer

View File

@ -14,7 +14,6 @@ import tempfile
from contextlib import contextmanager
from functools import partial, wraps
from hashlib import sha256
from io import open
from urllib.parse import urlparse
import boto3

View File

@ -19,7 +19,6 @@ import copy
import json
import logging
import os
from io import open
from .configuration_auto import ALL_PRETRAINED_CONFIG_ARCHIVE_MAP
from .file_utils import (

View File

@ -20,7 +20,6 @@ import json
import logging
import math
import os
from io import open
import torch
import torch.nn as nn

View File

@ -19,7 +19,6 @@ import collections
import logging
import os
import unicodedata
from io import open
from .tokenization_utils import PreTrainedTokenizer

View File

@ -18,7 +18,6 @@
import json
import logging
import os
from io import open
import regex as re

View File

@ -19,7 +19,6 @@ import json
import logging
import os
from functools import lru_cache
from io import open
import regex as re

View File

@ -19,7 +19,6 @@ import json
import logging
import os
import re
from io import open
from .tokenization_bert import BasicTokenizer
from .tokenization_utils import PreTrainedTokenizer

View File

@ -23,7 +23,6 @@ import logging
import os
import pickle
from collections import Counter, OrderedDict
from io import open
import numpy as np

View File

@ -21,7 +21,6 @@ import json
import logging
import os
import re
from io import open
from .file_utils import cached_path, hf_bucket_url, is_remote_url, is_tf_available, is_torch_available

View File

@ -21,7 +21,6 @@ import os
import re
import sys
import unicodedata
from io import open
import sacremoses as sm

View File

@ -19,7 +19,6 @@ import collections
import json
import logging
import math
from io import open
from transformers.tokenization_bert import BasicTokenizer, whitespace_tokenize

View File

@ -16,7 +16,6 @@
import os
import unittest
from io import open
from transformers.tokenization_bert import VOCAB_FILES_NAMES, XxxTokenizer

View File

@ -18,7 +18,6 @@
import collections
import logging
import os
from io import open
from .tokenization_utils import PreTrainedTokenizer

View File

@ -16,7 +16,6 @@
import os
import unittest
from io import open
from transformers.tokenization_bert import (
VOCAB_FILES_NAMES,

View File

@ -16,7 +16,6 @@
import os
import unittest
from io import open
from transformers.tokenization_bert import WordpieceTokenizer
from transformers.tokenization_bert_japanese import (

View File

@ -18,7 +18,6 @@ import os
import pickle
import shutil
import tempfile
from io import open
class TokenizerTesterMixin:

View File

@ -16,7 +16,6 @@
import json
import os
import unittest
from io import open
from transformers.tokenization_ctrl import VOCAB_FILES_NAMES, CTRLTokenizer

View File

@ -17,7 +17,6 @@
import json
import os
import unittest
from io import open
from transformers.tokenization_gpt2 import VOCAB_FILES_NAMES, GPT2Tokenizer

View File

@ -17,7 +17,6 @@
import json
import os
import unittest
from io import open
from transformers.tokenization_roberta import VOCAB_FILES_NAMES, RobertaTokenizer

View File

@ -16,7 +16,6 @@
import os
import unittest
from io import open
from transformers import is_torch_available