From c824d15aa1590ddb5d2fc977a8a1009a4b1d7262 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 22 Dec 2019 16:20:32 +0100 Subject: [PATCH] Remove __future__ imports. --- examples/contrib/run_swag.py | 2 +- examples/contrib/run_transfo_xl.py | 2 +- examples/distillation/run_squad_w_distillation.py | 1 - examples/mm-imdb/run_mmimdb.py | 1 - examples/run_generation.py | 2 +- examples/run_glue.py | 1 - examples/run_lm_finetuning.py | 1 - examples/run_multiple_choice.py | 1 - examples/run_ner.py | 1 - examples/run_squad.py | 1 - examples/run_xnli.py | 1 - examples/test_examples.py | 2 +- examples/utils_multiple_choice.py | 1 - examples/utils_ner.py | 1 - src/transformers/configuration_auto.py | 1 - src/transformers/configuration_bert.py | 1 - src/transformers/configuration_camembert.py | 1 - src/transformers/configuration_ctrl.py | 1 - src/transformers/configuration_distilbert.py | 2 +- src/transformers/configuration_gpt2.py | 1 - src/transformers/configuration_mmbt.py | 1 - src/transformers/configuration_openai.py | 1 - src/transformers/configuration_roberta.py | 1 - src/transformers/configuration_t5.py | 1 - src/transformers/configuration_transfo_xl.py | 1 - src/transformers/configuration_utils.py | 1 - src/transformers/configuration_xlm.py | 2 +- src/transformers/configuration_xlm_roberta.py | 1 - src/transformers/configuration_xlnet.py | 2 +- .../convert_albert_original_tf_checkpoint_to_pytorch.py | 1 - .../convert_bert_original_tf_checkpoint_to_pytorch.py | 1 - .../convert_gpt2_original_tf_checkpoint_to_pytorch.py | 1 - .../convert_openai_original_tf_checkpoint_to_pytorch.py | 1 - src/transformers/convert_pytorch_checkpoint_to_tf2.py | 1 - .../convert_roberta_original_pytorch_checkpoint_to_pytorch.py | 1 - .../convert_t5_original_tf_checkpoint_to_pytorch.py | 1 - .../convert_transfo_xl_original_tf_checkpoint_to_pytorch.py | 1 - .../convert_xlm_original_pytorch_checkpoint_to_pytorch.py | 1 - .../convert_xlnet_original_tf_checkpoint_to_pytorch.py | 1 - src/transformers/data/processors/xnli.py | 1 - src/transformers/file_utils.py | 2 +- src/transformers/hf_api.py | 2 +- src/transformers/modelcard.py | 1 - src/transformers/modeling_auto.py | 1 - src/transformers/modeling_bert.py | 1 - src/transformers/modeling_camembert.py | 1 - src/transformers/modeling_ctrl.py | 1 - src/transformers/modeling_distilbert.py | 2 +- src/transformers/modeling_encoder_decoder.py | 1 - src/transformers/modeling_gpt2.py | 1 - src/transformers/modeling_mmbt.py | 1 - src/transformers/modeling_openai.py | 1 - src/transformers/modeling_roberta.py | 1 - src/transformers/modeling_t5.py | 1 - src/transformers/modeling_tf_albert.py | 2 +- src/transformers/modeling_tf_auto.py | 1 - src/transformers/modeling_tf_bert.py | 1 - src/transformers/modeling_tf_ctrl.py | 1 - src/transformers/modeling_tf_distilbert.py | 2 +- src/transformers/modeling_tf_gpt2.py | 1 - src/transformers/modeling_tf_openai.py | 1 - src/transformers/modeling_tf_pytorch_utils.py | 1 - src/transformers/modeling_tf_roberta.py | 1 - src/transformers/modeling_tf_t5.py | 1 - src/transformers/modeling_tf_transfo_xl.py | 1 - src/transformers/modeling_tf_utils.py | 1 - src/transformers/modeling_tf_xlm.py | 2 +- src/transformers/modeling_tf_xlnet.py | 2 +- src/transformers/modeling_transfo_xl.py | 1 - src/transformers/modeling_utils.py | 1 - src/transformers/modeling_xlm.py | 2 +- src/transformers/modeling_xlm_roberta.py | 1 - src/transformers/modeling_xlnet.py | 2 +- src/transformers/optimization_tf.py | 1 - src/transformers/pipelines.py | 2 +- src/transformers/tokenization_albert.py | 2 +- src/transformers/tokenization_auto.py | 1 - src/transformers/tokenization_bert.py | 1 - src/transformers/tokenization_bert_japanese.py | 1 - src/transformers/tokenization_camembert.py | 2 +- src/transformers/tokenization_ctrl.py | 2 +- src/transformers/tokenization_distilbert.py | 1 - src/transformers/tokenization_gpt2.py | 2 +- src/transformers/tokenization_openai.py | 2 +- src/transformers/tokenization_roberta.py | 2 +- src/transformers/tokenization_t5.py | 1 - src/transformers/tokenization_transfo_xl.py | 2 +- src/transformers/tokenization_utils.py | 2 +- src/transformers/tokenization_xlm.py | 2 +- src/transformers/tokenization_xlm_roberta.py | 2 +- src/transformers/tokenization_xlnet.py | 2 +- templates/adding_a_new_example_script/run_xxx.py | 1 - templates/adding_a_new_example_script/utils_xxx.py | 1 - templates/adding_a_new_model/configuration_xxx.py | 1 - .../convert_xxx_original_tf_checkpoint_to_pytorch.py | 1 - templates/adding_a_new_model/modeling_tf_xxx.py | 1 - templates/adding_a_new_model/modeling_xxx.py | 1 - templates/adding_a_new_model/tests/test_modeling_tf_xxx.py | 2 +- templates/adding_a_new_model/tests/test_modeling_xxx.py | 2 +- templates/adding_a_new_model/tests/test_tokenization_xxx.py | 2 +- templates/adding_a_new_model/tokenization_xxx.py | 1 - tests/test_configuration_common.py | 2 +- tests/test_hf_api.py | 2 +- tests/test_model_card.py | 2 +- tests/test_modeling_albert.py | 2 +- tests/test_modeling_auto.py | 2 +- tests/test_modeling_bert.py | 2 +- tests/test_modeling_common.py | 2 +- tests/test_modeling_ctrl.py | 2 +- tests/test_modeling_distilbert.py | 2 +- tests/test_modeling_gpt2.py | 2 +- tests/test_modeling_openai.py | 2 +- tests/test_modeling_roberta.py | 2 +- tests/test_modeling_t5.py | 2 +- tests/test_modeling_tf_albert.py | 2 +- tests/test_modeling_tf_auto.py | 2 +- tests/test_modeling_tf_bert.py | 2 +- tests/test_modeling_tf_common.py | 2 +- tests/test_modeling_tf_ctrl.py | 2 +- tests/test_modeling_tf_distilbert.py | 2 +- tests/test_modeling_tf_gpt2.py | 2 +- tests/test_modeling_tf_openai_gpt.py | 2 +- tests/test_modeling_tf_roberta.py | 2 +- tests/test_modeling_tf_t5.py | 2 +- tests/test_modeling_tf_transfo_xl.py | 2 +- tests/test_modeling_tf_xlm.py | 2 +- tests/test_modeling_tf_xlnet.py | 2 +- tests/test_modeling_transfo_xl.py | 2 +- tests/test_modeling_xlm.py | 2 +- tests/test_modeling_xlnet.py | 2 +- tests/test_optimization.py | 2 +- tests/test_optimization_tf.py | 2 -- tests/test_tokenization_albert.py | 2 +- tests/test_tokenization_auto.py | 2 +- tests/test_tokenization_bert.py | 2 +- tests/test_tokenization_bert_japanese.py | 2 +- tests/test_tokenization_common.py | 2 +- tests/test_tokenization_ctrl.py | 2 +- tests/test_tokenization_distilbert.py | 2 +- tests/test_tokenization_gpt2.py | 2 +- tests/test_tokenization_openai.py | 2 +- tests/test_tokenization_roberta.py | 2 +- tests/test_tokenization_t5.py | 2 +- tests/test_tokenization_transfo_xl.py | 2 +- tests/test_tokenization_utils.py | 2 +- tests/test_tokenization_xlm.py | 2 +- tests/test_tokenization_xlnet.py | 2 +- 147 files changed, 76 insertions(+), 148 deletions(-) diff --git a/examples/contrib/run_swag.py b/examples/contrib/run_swag.py index bc6ff14979..7e1a4c8ee0 100644 --- a/examples/contrib/run_swag.py +++ b/examples/contrib/run_swag.py @@ -16,7 +16,7 @@ """BERT finetuning runner. Finetuning the library models for multiple choice on SWAG (Bert). """ -from __future__ import absolute_import, division, print_function + import argparse import csv diff --git a/examples/contrib/run_transfo_xl.py b/examples/contrib/run_transfo_xl.py index e4af4f6db5..ae4efbe00e 100644 --- a/examples/contrib/run_transfo_xl.py +++ b/examples/contrib/run_transfo_xl.py @@ -19,7 +19,7 @@ This script with default values evaluates a pretrained Transformer-XL on WikiText 103 """ -from __future__ import absolute_import, division, print_function, unicode_literals + import argparse import logging diff --git a/examples/distillation/run_squad_w_distillation.py b/examples/distillation/run_squad_w_distillation.py index c046730c12..86be0010ea 100644 --- a/examples/distillation/run_squad_w_distillation.py +++ b/examples/distillation/run_squad_w_distillation.py @@ -15,7 +15,6 @@ # limitations under the License. """ This is the exact same script as `examples/run_squad.py` (as of 2019, October 4th) with an additional and optional step of distillation.""" -from __future__ import absolute_import, division, print_function import argparse import glob diff --git a/examples/mm-imdb/run_mmimdb.py b/examples/mm-imdb/run_mmimdb.py index abea83bff9..eb12867f3a 100644 --- a/examples/mm-imdb/run_mmimdb.py +++ b/examples/mm-imdb/run_mmimdb.py @@ -15,7 +15,6 @@ # limitations under the License. """ Finetuning the library models for multimodal multiclass prediction on MM-IMDB dataset.""" -from __future__ import absolute_import, division, print_function import argparse import glob diff --git a/examples/run_generation.py b/examples/run_generation.py index 531c485326..4f1786914f 100644 --- a/examples/run_generation.py +++ b/examples/run_generation.py @@ -16,7 +16,7 @@ # limitations under the License. """ Conditional text generation with the auto-regressive models of the library (GPT/GPT-2/CTRL/Transformer-XL/XLNet) """ -from __future__ import absolute_import, division, print_function, unicode_literals + import argparse import logging diff --git a/examples/run_glue.py b/examples/run_glue.py index fe5cc7e604..a8e7356925 100644 --- a/examples/run_glue.py +++ b/examples/run_glue.py @@ -15,7 +15,6 @@ # limitations under the License. """ Finetuning the library models for sequence classification on GLUE (Bert, XLM, XLNet, RoBERTa).""" -from __future__ import absolute_import, division, print_function import argparse import glob diff --git a/examples/run_lm_finetuning.py b/examples/run_lm_finetuning.py index 1fae12299d..24fdefa1d6 100644 --- a/examples/run_lm_finetuning.py +++ b/examples/run_lm_finetuning.py @@ -19,7 +19,6 @@ GPT and GPT-2 are fine-tuned using a causal language modeling (CLM) loss while B using a masked language modeling (MLM) loss. """ -from __future__ import absolute_import, division, print_function import argparse import glob diff --git a/examples/run_multiple_choice.py b/examples/run_multiple_choice.py index cb0ddb09a5..8b3ac9cf54 100644 --- a/examples/run_multiple_choice.py +++ b/examples/run_multiple_choice.py @@ -15,7 +15,6 @@ # limitations under the License. """ Finetuning the library models for multiple choice (Bert, Roberta, XLNet).""" -from __future__ import absolute_import, division, print_function import argparse import glob diff --git a/examples/run_ner.py b/examples/run_ner.py index 34ba2663bf..3ec9fbe0f5 100644 --- a/examples/run_ner.py +++ b/examples/run_ner.py @@ -15,7 +15,6 @@ # limitations under the License. """ Fine-tuning the library models for named entity recognition on CoNLL-2003 (Bert or Roberta). """ -from __future__ import absolute_import, division, print_function import argparse import glob diff --git a/examples/run_squad.py b/examples/run_squad.py index 6495d29721..3df30144c4 100644 --- a/examples/run_squad.py +++ b/examples/run_squad.py @@ -15,7 +15,6 @@ # limitations under the License. """ Finetuning the library models for question-answering on SQuAD (DistilBERT, Bert, XLM, XLNet).""" -from __future__ import absolute_import, division, print_function import argparse import glob diff --git a/examples/run_xnli.py b/examples/run_xnli.py index f550ca7c58..77842bb0ee 100644 --- a/examples/run_xnli.py +++ b/examples/run_xnli.py @@ -16,7 +16,6 @@ """ Finetuning multi-lingual models on XNLI (Bert, DistilBERT, XLM). Adapted from `examples/run_glue.py`""" -from __future__ import absolute_import, division, print_function import argparse import glob diff --git a/examples/test_examples.py b/examples/test_examples.py index 8a01b4b0bc..1744fe0423 100644 --- a/examples/test_examples.py +++ b/examples/test_examples.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import argparse import logging diff --git a/examples/utils_multiple_choice.py b/examples/utils_multiple_choice.py index 1eea8f3352..f5dc08024e 100644 --- a/examples/utils_multiple_choice.py +++ b/examples/utils_multiple_choice.py @@ -15,7 +15,6 @@ # limitations under the License. """ Multiple choice fine-tuning: utilities to work with multiple choice tasks of reading comprehension """ -from __future__ import absolute_import, division, print_function import csv import glob diff --git a/examples/utils_ner.py b/examples/utils_ner.py index 214064e844..226869cae0 100644 --- a/examples/utils_ner.py +++ b/examples/utils_ner.py @@ -15,7 +15,6 @@ # limitations under the License. """ Named entity recognition fine-tuning: utilities to work with CoNLL-2003 task. """ -from __future__ import absolute_import, division, print_function import logging import os diff --git a/src/transformers/configuration_auto.py b/src/transformers/configuration_auto.py index 2c1d3f9d7f..32a0385eca 100644 --- a/src/transformers/configuration_auto.py +++ b/src/transformers/configuration_auto.py @@ -14,7 +14,6 @@ # limitations under the License. """ Auto Model class. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_bert.py b/src/transformers/configuration_bert.py index 2ad168b5bc..32fa50a504 100644 --- a/src/transformers/configuration_bert.py +++ b/src/transformers/configuration_bert.py @@ -15,7 +15,6 @@ # limitations under the License. """ BERT model configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_camembert.py b/src/transformers/configuration_camembert.py index 12f7d591e2..8ecdf714b1 100644 --- a/src/transformers/configuration_camembert.py +++ b/src/transformers/configuration_camembert.py @@ -15,7 +15,6 @@ # limitations under the License. """ CamemBERT configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_ctrl.py b/src/transformers/configuration_ctrl.py index 001991df78..e23bf7a376 100644 --- a/src/transformers/configuration_ctrl.py +++ b/src/transformers/configuration_ctrl.py @@ -14,7 +14,6 @@ # limitations under the License. """ Salesforce CTRL configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_distilbert.py b/src/transformers/configuration_distilbert.py index 2f6ec6eda2..1dd4a11912 100644 --- a/src/transformers/configuration_distilbert.py +++ b/src/transformers/configuration_distilbert.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """ DistilBERT model configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging diff --git a/src/transformers/configuration_gpt2.py b/src/transformers/configuration_gpt2.py index e14923216f..8da1800747 100644 --- a/src/transformers/configuration_gpt2.py +++ b/src/transformers/configuration_gpt2.py @@ -15,7 +15,6 @@ # limitations under the License. """ OpenAI GPT-2 configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_mmbt.py b/src/transformers/configuration_mmbt.py index 3d85d4448b..b072468e7f 100644 --- a/src/transformers/configuration_mmbt.py +++ b/src/transformers/configuration_mmbt.py @@ -15,7 +15,6 @@ # limitations under the License. """ MMBT configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_openai.py b/src/transformers/configuration_openai.py index cc70a210f8..d7e88bda92 100644 --- a/src/transformers/configuration_openai.py +++ b/src/transformers/configuration_openai.py @@ -15,7 +15,6 @@ # limitations under the License. """ OpenAI GPT configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_roberta.py b/src/transformers/configuration_roberta.py index 7b1074abd1..f505a699b1 100644 --- a/src/transformers/configuration_roberta.py +++ b/src/transformers/configuration_roberta.py @@ -15,7 +15,6 @@ # limitations under the License. """ RoBERTa configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_t5.py b/src/transformers/configuration_t5.py index 9ba1ada6d0..deef206d01 100644 --- a/src/transformers/configuration_t5.py +++ b/src/transformers/configuration_t5.py @@ -14,7 +14,6 @@ # limitations under the License. """ T5 model configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_transfo_xl.py b/src/transformers/configuration_transfo_xl.py index 38028cfbbb..7b285ca3ed 100644 --- a/src/transformers/configuration_transfo_xl.py +++ b/src/transformers/configuration_transfo_xl.py @@ -15,7 +15,6 @@ # limitations under the License. """ Transformer XL configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_utils.py b/src/transformers/configuration_utils.py index 696930bb5d..21c08f135a 100644 --- a/src/transformers/configuration_utils.py +++ b/src/transformers/configuration_utils.py @@ -15,7 +15,6 @@ # limitations under the License. """ Configuration base class and utilities.""" -from __future__ import absolute_import, division, print_function, unicode_literals import copy import json diff --git a/src/transformers/configuration_xlm.py b/src/transformers/configuration_xlm.py index a9b4cc9554..b56182413b 100644 --- a/src/transformers/configuration_xlm.py +++ b/src/transformers/configuration_xlm.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """ XLM configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging diff --git a/src/transformers/configuration_xlm_roberta.py b/src/transformers/configuration_xlm_roberta.py index bbd275ffea..a9cdf7c160 100644 --- a/src/transformers/configuration_xlm_roberta.py +++ b/src/transformers/configuration_xlm_roberta.py @@ -15,7 +15,6 @@ # limitations under the License. """ XLM-RoBERTa configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/configuration_xlnet.py b/src/transformers/configuration_xlnet.py index 1404dfeaea..38d00d7604 100644 --- a/src/transformers/configuration_xlnet.py +++ b/src/transformers/configuration_xlnet.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """ XLNet configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging diff --git a/src/transformers/convert_albert_original_tf_checkpoint_to_pytorch.py b/src/transformers/convert_albert_original_tf_checkpoint_to_pytorch.py index 957379b5b8..88658d5a9f 100644 --- a/src/transformers/convert_albert_original_tf_checkpoint_to_pytorch.py +++ b/src/transformers/convert_albert_original_tf_checkpoint_to_pytorch.py @@ -14,7 +14,6 @@ # limitations under the License. """Convert ALBERT checkpoint.""" -from __future__ import absolute_import, division, print_function import argparse import logging diff --git a/src/transformers/convert_bert_original_tf_checkpoint_to_pytorch.py b/src/transformers/convert_bert_original_tf_checkpoint_to_pytorch.py index 50695dedbe..806ace556a 100755 --- a/src/transformers/convert_bert_original_tf_checkpoint_to_pytorch.py +++ b/src/transformers/convert_bert_original_tf_checkpoint_to_pytorch.py @@ -14,7 +14,6 @@ # limitations under the License. """Convert BERT checkpoint.""" -from __future__ import absolute_import, division, print_function import argparse import logging diff --git a/src/transformers/convert_gpt2_original_tf_checkpoint_to_pytorch.py b/src/transformers/convert_gpt2_original_tf_checkpoint_to_pytorch.py index 4f5bb0aa6c..f9483659f5 100755 --- a/src/transformers/convert_gpt2_original_tf_checkpoint_to_pytorch.py +++ b/src/transformers/convert_gpt2_original_tf_checkpoint_to_pytorch.py @@ -14,7 +14,6 @@ # limitations under the License. """Convert OpenAI GPT checkpoint.""" -from __future__ import absolute_import, division, print_function import argparse import logging diff --git a/src/transformers/convert_openai_original_tf_checkpoint_to_pytorch.py b/src/transformers/convert_openai_original_tf_checkpoint_to_pytorch.py index d1d245dbef..0b1a28e41a 100755 --- a/src/transformers/convert_openai_original_tf_checkpoint_to_pytorch.py +++ b/src/transformers/convert_openai_original_tf_checkpoint_to_pytorch.py @@ -14,7 +14,6 @@ # limitations under the License. """Convert OpenAI GPT checkpoint.""" -from __future__ import absolute_import, division, print_function import argparse import logging diff --git a/src/transformers/convert_pytorch_checkpoint_to_tf2.py b/src/transformers/convert_pytorch_checkpoint_to_tf2.py index 9eb8529fe8..ba2165dbaa 100644 --- a/src/transformers/convert_pytorch_checkpoint_to_tf2.py +++ b/src/transformers/convert_pytorch_checkpoint_to_tf2.py @@ -14,7 +14,6 @@ # limitations under the License. """ Convert pytorch checkpoints to TensorFlow """ -from __future__ import absolute_import, division, print_function import argparse import logging diff --git a/src/transformers/convert_roberta_original_pytorch_checkpoint_to_pytorch.py b/src/transformers/convert_roberta_original_pytorch_checkpoint_to_pytorch.py index 7e86f3a933..df4c341436 100644 --- a/src/transformers/convert_roberta_original_pytorch_checkpoint_to_pytorch.py +++ b/src/transformers/convert_roberta_original_pytorch_checkpoint_to_pytorch.py @@ -14,7 +14,6 @@ # limitations under the License. """Convert RoBERTa checkpoint.""" -from __future__ import absolute_import, division, print_function import argparse import logging diff --git a/src/transformers/convert_t5_original_tf_checkpoint_to_pytorch.py b/src/transformers/convert_t5_original_tf_checkpoint_to_pytorch.py index 94ba61f6e4..e497a5a641 100755 --- a/src/transformers/convert_t5_original_tf_checkpoint_to_pytorch.py +++ b/src/transformers/convert_t5_original_tf_checkpoint_to_pytorch.py @@ -14,7 +14,6 @@ # limitations under the License. """Convert T5 checkpoint.""" -from __future__ import absolute_import, division, print_function import argparse import logging diff --git a/src/transformers/convert_transfo_xl_original_tf_checkpoint_to_pytorch.py b/src/transformers/convert_transfo_xl_original_tf_checkpoint_to_pytorch.py index dc3241706f..ebcd9b4a64 100755 --- a/src/transformers/convert_transfo_xl_original_tf_checkpoint_to_pytorch.py +++ b/src/transformers/convert_transfo_xl_original_tf_checkpoint_to_pytorch.py @@ -14,7 +14,6 @@ # limitations under the License. """Convert Transformer XL checkpoint and datasets.""" -from __future__ import absolute_import, division, print_function import argparse import logging diff --git a/src/transformers/convert_xlm_original_pytorch_checkpoint_to_pytorch.py b/src/transformers/convert_xlm_original_pytorch_checkpoint_to_pytorch.py index 30768fa96c..341fe71da2 100755 --- a/src/transformers/convert_xlm_original_pytorch_checkpoint_to_pytorch.py +++ b/src/transformers/convert_xlm_original_pytorch_checkpoint_to_pytorch.py @@ -14,7 +14,6 @@ # limitations under the License. """Convert OpenAI GPT checkpoint.""" -from __future__ import absolute_import, division, print_function import argparse import json diff --git a/src/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py b/src/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py index 5c65224491..51eed0e121 100755 --- a/src/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py +++ b/src/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py @@ -14,7 +14,6 @@ # limitations under the License. """Convert BERT checkpoint.""" -from __future__ import absolute_import, division, print_function import argparse import logging diff --git a/src/transformers/data/processors/xnli.py b/src/transformers/data/processors/xnli.py index d67a53062e..6a744c6280 100644 --- a/src/transformers/data/processors/xnli.py +++ b/src/transformers/data/processors/xnli.py @@ -15,7 +15,6 @@ # limitations under the License. """ XNLI utils (dataset loading and evaluation) """ -from __future__ import absolute_import, division, print_function import logging import os diff --git a/src/transformers/file_utils.py b/src/transformers/file_utils.py index 2334ff06b3..55062e7f0e 100644 --- a/src/transformers/file_utils.py +++ b/src/transformers/file_utils.py @@ -3,7 +3,7 @@ Utilities for working with the local dataset cache. This file is adapted from the AllenNLP library at https://github.com/allenai/allennlp Copyright by the AllenNLP authors. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import fnmatch import json diff --git a/src/transformers/hf_api.py b/src/transformers/hf_api.py index 9e287bd5b3..9666282196 100644 --- a/src/transformers/hf_api.py +++ b/src/transformers/hf_api.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import io import os diff --git a/src/transformers/modelcard.py b/src/transformers/modelcard.py index bd218f0c46..0efa42158f 100644 --- a/src/transformers/modelcard.py +++ b/src/transformers/modelcard.py @@ -14,7 +14,6 @@ # limitations under the License. """ Configuration base class and utilities.""" -from __future__ import absolute_import, division, print_function, unicode_literals import copy import json diff --git a/src/transformers/modeling_auto.py b/src/transformers/modeling_auto.py index 0bbefb4fd2..d2d18586be 100644 --- a/src/transformers/modeling_auto.py +++ b/src/transformers/modeling_auto.py @@ -14,7 +14,6 @@ # limitations under the License. """ Auto Model class. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_bert.py b/src/transformers/modeling_bert.py index 9b56bc45d4..cbb82c4419 100644 --- a/src/transformers/modeling_bert.py +++ b/src/transformers/modeling_bert.py @@ -15,7 +15,6 @@ # limitations under the License. """PyTorch BERT model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging import math diff --git a/src/transformers/modeling_camembert.py b/src/transformers/modeling_camembert.py index d38751a1d7..b16df3f9b9 100644 --- a/src/transformers/modeling_camembert.py +++ b/src/transformers/modeling_camembert.py @@ -15,7 +15,6 @@ # limitations under the License. """PyTorch CamemBERT model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_ctrl.py b/src/transformers/modeling_ctrl.py index 9cd1ad7313..b4906b7aa6 100644 --- a/src/transformers/modeling_ctrl.py +++ b/src/transformers/modeling_ctrl.py @@ -15,7 +15,6 @@ # limitations under the License. """ PyTorch CTRL model.""" -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_distilbert.py b/src/transformers/modeling_distilbert.py index 1c6cef1b33..0563dcf852 100644 --- a/src/transformers/modeling_distilbert.py +++ b/src/transformers/modeling_distilbert.py @@ -16,7 +16,7 @@ adapted in part from Facebook, Inc XLM model (https://github.com/facebookresearch/XLM) and in part from HuggingFace PyTorch version of Google AI Bert model (https://github.com/google-research/bert) """ -from __future__ import absolute_import, division, print_function, unicode_literals + import copy import logging diff --git a/src/transformers/modeling_encoder_decoder.py b/src/transformers/modeling_encoder_decoder.py index ec90dc7e45..9578b121f6 100644 --- a/src/transformers/modeling_encoder_decoder.py +++ b/src/transformers/modeling_encoder_decoder.py @@ -14,7 +14,6 @@ # limitations under the License. """ Classes to support Encoder-Decoder architectures """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging import os diff --git a/src/transformers/modeling_gpt2.py b/src/transformers/modeling_gpt2.py index 15ae12c15d..c8d5040f2f 100644 --- a/src/transformers/modeling_gpt2.py +++ b/src/transformers/modeling_gpt2.py @@ -15,7 +15,6 @@ # limitations under the License. """PyTorch OpenAI GPT-2 model.""" -from __future__ import absolute_import, division, print_function, unicode_literals import logging import math diff --git a/src/transformers/modeling_mmbt.py b/src/transformers/modeling_mmbt.py index 490969fc36..bd0b9cc81a 100644 --- a/src/transformers/modeling_mmbt.py +++ b/src/transformers/modeling_mmbt.py @@ -15,7 +15,6 @@ # limitations under the License. """PyTorch MMBT model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_openai.py b/src/transformers/modeling_openai.py index c3dec01092..b0855e40f0 100644 --- a/src/transformers/modeling_openai.py +++ b/src/transformers/modeling_openai.py @@ -15,7 +15,6 @@ # limitations under the License. """PyTorch OpenAI GPT model.""" -from __future__ import absolute_import, division, print_function, unicode_literals import json import logging diff --git a/src/transformers/modeling_roberta.py b/src/transformers/modeling_roberta.py index d4cad0d0d4..8958d30a22 100644 --- a/src/transformers/modeling_roberta.py +++ b/src/transformers/modeling_roberta.py @@ -15,7 +15,6 @@ # limitations under the License. """PyTorch RoBERTa model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_t5.py b/src/transformers/modeling_t5.py index 5c2cd403f1..9c169d5016 100644 --- a/src/transformers/modeling_t5.py +++ b/src/transformers/modeling_t5.py @@ -14,7 +14,6 @@ # limitations under the License. """ PyTorch T5 model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import copy import itertools diff --git a/src/transformers/modeling_tf_albert.py b/src/transformers/modeling_tf_albert.py index ab9d14ab14..1c9bf7325b 100644 --- a/src/transformers/modeling_tf_albert.py +++ b/src/transformers/modeling_tf_albert.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """ TF 2.0 ALBERT model. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging import sys diff --git a/src/transformers/modeling_tf_auto.py b/src/transformers/modeling_tf_auto.py index e34f417a6b..5463a73668 100644 --- a/src/transformers/modeling_tf_auto.py +++ b/src/transformers/modeling_tf_auto.py @@ -14,7 +14,6 @@ # limitations under the License. """ Auto Model class. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_tf_bert.py b/src/transformers/modeling_tf_bert.py index c95455696c..7929a1337e 100644 --- a/src/transformers/modeling_tf_bert.py +++ b/src/transformers/modeling_tf_bert.py @@ -15,7 +15,6 @@ # limitations under the License. """ TF 2.0 BERT model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging import sys diff --git a/src/transformers/modeling_tf_ctrl.py b/src/transformers/modeling_tf_ctrl.py index 5b73fb1930..bb4c4a6a7f 100644 --- a/src/transformers/modeling_tf_ctrl.py +++ b/src/transformers/modeling_tf_ctrl.py @@ -15,7 +15,6 @@ # limitations under the License. """ TF 2.0 CTRL model.""" -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_tf_distilbert.py b/src/transformers/modeling_tf_distilbert.py index 95a5ec0361..f588a9b2af 100644 --- a/src/transformers/modeling_tf_distilbert.py +++ b/src/transformers/modeling_tf_distilbert.py @@ -14,7 +14,7 @@ # limitations under the License. """ TF 2.0 DistilBERT model """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging import math diff --git a/src/transformers/modeling_tf_gpt2.py b/src/transformers/modeling_tf_gpt2.py index 47870cfa7b..927f4fd912 100644 --- a/src/transformers/modeling_tf_gpt2.py +++ b/src/transformers/modeling_tf_gpt2.py @@ -15,7 +15,6 @@ # limitations under the License. """ TF 2.0 OpenAI GPT-2 model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_tf_openai.py b/src/transformers/modeling_tf_openai.py index f6430eecc6..ced36af25b 100644 --- a/src/transformers/modeling_tf_openai.py +++ b/src/transformers/modeling_tf_openai.py @@ -15,7 +15,6 @@ # limitations under the License. """ TF 2.0 OpenAI GPT model.""" -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_tf_pytorch_utils.py b/src/transformers/modeling_tf_pytorch_utils.py index 3882cd3c43..964b412173 100644 --- a/src/transformers/modeling_tf_pytorch_utils.py +++ b/src/transformers/modeling_tf_pytorch_utils.py @@ -15,7 +15,6 @@ # limitations under the License. """ PyTorch - TF 2.0 general utilities.""" -from __future__ import absolute_import, division, print_function, unicode_literals import logging import os diff --git a/src/transformers/modeling_tf_roberta.py b/src/transformers/modeling_tf_roberta.py index 9ad93c0b57..0e33d2bdbe 100644 --- a/src/transformers/modeling_tf_roberta.py +++ b/src/transformers/modeling_tf_roberta.py @@ -15,7 +15,6 @@ # limitations under the License. """ TF 2.0 RoBERTa model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_tf_t5.py b/src/transformers/modeling_tf_t5.py index 84767eb13d..5840407273 100644 --- a/src/transformers/modeling_tf_t5.py +++ b/src/transformers/modeling_tf_t5.py @@ -15,7 +15,6 @@ # limitations under the License. """ TF 2.0 T5 model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import copy import itertools diff --git a/src/transformers/modeling_tf_transfo_xl.py b/src/transformers/modeling_tf_transfo_xl.py index 1f3f7cd559..639932437a 100644 --- a/src/transformers/modeling_tf_transfo_xl.py +++ b/src/transformers/modeling_tf_transfo_xl.py @@ -16,7 +16,6 @@ """ TF 2.0 Transformer XL model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_tf_utils.py b/src/transformers/modeling_tf_utils.py index bd9df00910..bfb773e38a 100644 --- a/src/transformers/modeling_tf_utils.py +++ b/src/transformers/modeling_tf_utils.py @@ -15,7 +15,6 @@ # limitations under the License. """TF general model utils.""" -from __future__ import absolute_import, division, print_function, unicode_literals import logging import os diff --git a/src/transformers/modeling_tf_xlm.py b/src/transformers/modeling_tf_xlm.py index 8ca5c6993c..0cf69528d1 100644 --- a/src/transformers/modeling_tf_xlm.py +++ b/src/transformers/modeling_tf_xlm.py @@ -14,7 +14,7 @@ # limitations under the License. """ TF 2.0 XLM model. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import itertools import logging diff --git a/src/transformers/modeling_tf_xlnet.py b/src/transformers/modeling_tf_xlnet.py index 0fe898b168..4fc9d39693 100644 --- a/src/transformers/modeling_tf_xlnet.py +++ b/src/transformers/modeling_tf_xlnet.py @@ -15,7 +15,7 @@ # limitations under the License. """ TF 2.0 XLNet model. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging import sys diff --git a/src/transformers/modeling_transfo_xl.py b/src/transformers/modeling_transfo_xl.py index a6b71538ea..3589a3d87d 100644 --- a/src/transformers/modeling_transfo_xl.py +++ b/src/transformers/modeling_transfo_xl.py @@ -18,7 +18,6 @@ In particular https://github.com/kimiyoung/transformer-xl/blob/master/pytorch/mem_transformer.py """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_utils.py b/src/transformers/modeling_utils.py index 6fe6fd5322..0ec6972841 100644 --- a/src/transformers/modeling_utils.py +++ b/src/transformers/modeling_utils.py @@ -15,7 +15,6 @@ # limitations under the License. """PyTorch BERT model.""" -from __future__ import absolute_import, division, print_function, unicode_literals import logging import os diff --git a/src/transformers/modeling_xlm.py b/src/transformers/modeling_xlm.py index ac45e3e205..398d385aa5 100644 --- a/src/transformers/modeling_xlm.py +++ b/src/transformers/modeling_xlm.py @@ -14,7 +14,7 @@ # limitations under the License. """ PyTorch XLM model. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import itertools import logging diff --git a/src/transformers/modeling_xlm_roberta.py b/src/transformers/modeling_xlm_roberta.py index f20e8e3002..f7ab857e63 100644 --- a/src/transformers/modeling_xlm_roberta.py +++ b/src/transformers/modeling_xlm_roberta.py @@ -15,7 +15,6 @@ # limitations under the License. """PyTorch XLM-RoBERTa model. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/modeling_xlnet.py b/src/transformers/modeling_xlnet.py index 9682c5a230..26e3ddef37 100644 --- a/src/transformers/modeling_xlnet.py +++ b/src/transformers/modeling_xlnet.py @@ -15,7 +15,7 @@ # limitations under the License. """ PyTorch XLNet model. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging import math diff --git a/src/transformers/optimization_tf.py b/src/transformers/optimization_tf.py index 83eff902fb..d4e0635719 100644 --- a/src/transformers/optimization_tf.py +++ b/src/transformers/optimization_tf.py @@ -14,7 +14,6 @@ # ============================================================================== """Functions and classes related to optimization (weight updates).""" -from __future__ import absolute_import, division, print_function import re diff --git a/src/transformers/pipelines.py b/src/transformers/pipelines.py index 1a18de0d96..605d8b84e3 100755 --- a/src/transformers/pipelines.py +++ b/src/transformers/pipelines.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import csv import json diff --git a/src/transformers/tokenization_albert.py b/src/transformers/tokenization_albert.py index 699304bb5d..04f0bf00af 100644 --- a/src/transformers/tokenization_albert.py +++ b/src/transformers/tokenization_albert.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """ Tokenization classes for ALBERT model.""" -from __future__ import absolute_import, division, print_function, unicode_literals + import logging import os diff --git a/src/transformers/tokenization_auto.py b/src/transformers/tokenization_auto.py index 7077ec134c..e01f017733 100644 --- a/src/transformers/tokenization_auto.py +++ b/src/transformers/tokenization_auto.py @@ -14,7 +14,6 @@ # limitations under the License. """ Auto Model class. """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/tokenization_bert.py b/src/transformers/tokenization_bert.py index fc1c918df1..ef8a7d8391 100644 --- a/src/transformers/tokenization_bert.py +++ b/src/transformers/tokenization_bert.py @@ -14,7 +14,6 @@ # limitations under the License. """Tokenization classes.""" -from __future__ import absolute_import, division, print_function, unicode_literals import collections import logging diff --git a/src/transformers/tokenization_bert_japanese.py b/src/transformers/tokenization_bert_japanese.py index 439d652bed..893db031d4 100644 --- a/src/transformers/tokenization_bert_japanese.py +++ b/src/transformers/tokenization_bert_japanese.py @@ -14,7 +14,6 @@ # limitations under the License. """Tokenization classes.""" -from __future__ import absolute_import, division, print_function, unicode_literals import collections import logging diff --git a/src/transformers/tokenization_camembert.py b/src/transformers/tokenization_camembert.py index c5ae705f51..09104bbbf0 100644 --- a/src/transformers/tokenization_camembert.py +++ b/src/transformers/tokenization_camembert.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License """ Tokenization classes for Camembert model.""" -from __future__ import absolute_import, division, print_function, unicode_literals + import logging import os diff --git a/src/transformers/tokenization_ctrl.py b/src/transformers/tokenization_ctrl.py index 24036b422a..e40df10448 100644 --- a/src/transformers/tokenization_ctrl.py +++ b/src/transformers/tokenization_ctrl.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """Tokenization classes for Salesforce CTRL.""" -from __future__ import absolute_import, division, print_function, unicode_literals + import json import logging diff --git a/src/transformers/tokenization_distilbert.py b/src/transformers/tokenization_distilbert.py index 0821c859d8..f64e5681e5 100644 --- a/src/transformers/tokenization_distilbert.py +++ b/src/transformers/tokenization_distilbert.py @@ -14,7 +14,6 @@ # limitations under the License. """Tokenization classes for DistilBERT.""" -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/src/transformers/tokenization_gpt2.py b/src/transformers/tokenization_gpt2.py index 6b2b85093f..ff96b07945 100644 --- a/src/transformers/tokenization_gpt2.py +++ b/src/transformers/tokenization_gpt2.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """Tokenization classes for OpenAI GPT.""" -from __future__ import absolute_import, division, print_function, unicode_literals + import json import logging diff --git a/src/transformers/tokenization_openai.py b/src/transformers/tokenization_openai.py index 9c4c485483..693a76377e 100644 --- a/src/transformers/tokenization_openai.py +++ b/src/transformers/tokenization_openai.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """Tokenization classes for OpenAI GPT.""" -from __future__ import absolute_import, division, print_function, unicode_literals + import json import logging diff --git a/src/transformers/tokenization_roberta.py b/src/transformers/tokenization_roberta.py index bc1695f238..8f0b579230 100644 --- a/src/transformers/tokenization_roberta.py +++ b/src/transformers/tokenization_roberta.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """Tokenization classes for RoBERTa.""" -from __future__ import absolute_import, division, print_function, unicode_literals + import logging diff --git a/src/transformers/tokenization_t5.py b/src/transformers/tokenization_t5.py index e9921fef8d..d5a051107c 100644 --- a/src/transformers/tokenization_t5.py +++ b/src/transformers/tokenization_t5.py @@ -14,7 +14,6 @@ # limitations under the License. """ Tokenization class for model T5.""" -from __future__ import absolute_import, division, print_function, unicode_literals import logging import os diff --git a/src/transformers/tokenization_transfo_xl.py b/src/transformers/tokenization_transfo_xl.py index 9f5dc63f63..0ed96302d6 100644 --- a/src/transformers/tokenization_transfo_xl.py +++ b/src/transformers/tokenization_transfo_xl.py @@ -16,7 +16,7 @@ """ Tokenization classes for Transformer XL model. Adapted from https://github.com/kimiyoung/transformer-xl. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import glob import logging diff --git a/src/transformers/tokenization_utils.py b/src/transformers/tokenization_utils.py index 8c60beb9d3..e7f5d99182 100644 --- a/src/transformers/tokenization_utils.py +++ b/src/transformers/tokenization_utils.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """Tokenization classes for OpenAI GPT.""" -from __future__ import absolute_import, division, print_function, unicode_literals + import copy import itertools diff --git a/src/transformers/tokenization_xlm.py b/src/transformers/tokenization_xlm.py index 062d2697a0..ffc4c5679f 100644 --- a/src/transformers/tokenization_xlm.py +++ b/src/transformers/tokenization_xlm.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """Tokenization classes for XLM.""" -from __future__ import absolute_import, division, print_function, unicode_literals + import json import logging diff --git a/src/transformers/tokenization_xlm_roberta.py b/src/transformers/tokenization_xlm_roberta.py index de71f87d02..525a7f5c27 100644 --- a/src/transformers/tokenization_xlm_roberta.py +++ b/src/transformers/tokenization_xlm_roberta.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License """ Tokenization classes for XLM-RoBERTa model.""" -from __future__ import absolute_import, division, print_function, unicode_literals + import logging import os diff --git a/src/transformers/tokenization_xlnet.py b/src/transformers/tokenization_xlnet.py index ac41afb802..f8251b2a90 100644 --- a/src/transformers/tokenization_xlnet.py +++ b/src/transformers/tokenization_xlnet.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """ Tokenization classes for XLNet model.""" -from __future__ import absolute_import, division, print_function, unicode_literals + import logging import os diff --git a/templates/adding_a_new_example_script/run_xxx.py b/templates/adding_a_new_example_script/run_xxx.py index aa5c5ae4c9..d2453ad305 100644 --- a/templates/adding_a_new_example_script/run_xxx.py +++ b/templates/adding_a_new_example_script/run_xxx.py @@ -14,7 +14,6 @@ # limitations under the License. """ Finetuning the library models for task XXX.""" -from __future__ import absolute_import, division, print_function import argparse import glob diff --git a/templates/adding_a_new_example_script/utils_xxx.py b/templates/adding_a_new_example_script/utils_xxx.py index 4c5b97bd50..141e981cbe 100644 --- a/templates/adding_a_new_example_script/utils_xxx.py +++ b/templates/adding_a_new_example_script/utils_xxx.py @@ -14,7 +14,6 @@ # limitations under the License. """ Load XXX dataset. """ -from __future__ import absolute_import, division, print_function import collections import json diff --git a/templates/adding_a_new_model/configuration_xxx.py b/templates/adding_a_new_model/configuration_xxx.py index f2feb7360e..647db8207b 100644 --- a/templates/adding_a_new_model/configuration_xxx.py +++ b/templates/adding_a_new_model/configuration_xxx.py @@ -14,7 +14,6 @@ # limitations under the License. """ XXX model configuration """ -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/templates/adding_a_new_model/convert_xxx_original_tf_checkpoint_to_pytorch.py b/templates/adding_a_new_model/convert_xxx_original_tf_checkpoint_to_pytorch.py index 06aa4bf378..b57d3bbdca 100755 --- a/templates/adding_a_new_model/convert_xxx_original_tf_checkpoint_to_pytorch.py +++ b/templates/adding_a_new_model/convert_xxx_original_tf_checkpoint_to_pytorch.py @@ -14,7 +14,6 @@ # limitations under the License. """Convert XXX checkpoint.""" -from __future__ import absolute_import, division, print_function import argparse import logging diff --git a/templates/adding_a_new_model/modeling_tf_xxx.py b/templates/adding_a_new_model/modeling_tf_xxx.py index df64c19220..ed0eb03320 100644 --- a/templates/adding_a_new_model/modeling_tf_xxx.py +++ b/templates/adding_a_new_model/modeling_tf_xxx.py @@ -19,7 +19,6 @@ # In this template, replace all the XXX (various casings) with your model name #################################################### -from __future__ import absolute_import, division, print_function, unicode_literals import logging diff --git a/templates/adding_a_new_model/modeling_xxx.py b/templates/adding_a_new_model/modeling_xxx.py index 6db97df1bf..6faa379829 100644 --- a/templates/adding_a_new_model/modeling_xxx.py +++ b/templates/adding_a_new_model/modeling_xxx.py @@ -18,7 +18,6 @@ # In this template, replace all the XXX (various casings) with your model name #################################################### -from __future__ import absolute_import, division, print_function, unicode_literals import logging import os diff --git a/templates/adding_a_new_model/tests/test_modeling_tf_xxx.py b/templates/adding_a_new_model/tests/test_modeling_tf_xxx.py index d7689d2810..3e12b3f745 100644 --- a/templates/adding_a_new_model/tests/test_modeling_tf_xxx.py +++ b/templates/adding_a_new_model/tests/test_modeling_tf_xxx.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/templates/adding_a_new_model/tests/test_modeling_xxx.py b/templates/adding_a_new_model/tests/test_modeling_xxx.py index d66a91e3e4..281a9226fc 100644 --- a/templates/adding_a_new_model/tests/test_modeling_xxx.py +++ b/templates/adding_a_new_model/tests/test_modeling_xxx.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/templates/adding_a_new_model/tests/test_tokenization_xxx.py b/templates/adding_a_new_model/tests/test_tokenization_xxx.py index bbfe256db7..314345e870 100644 --- a/templates/adding_a_new_model/tests/test_tokenization_xxx.py +++ b/templates/adding_a_new_model/tests/test_tokenization_xxx.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import os import unittest diff --git a/templates/adding_a_new_model/tokenization_xxx.py b/templates/adding_a_new_model/tokenization_xxx.py index 690815b970..af26102832 100644 --- a/templates/adding_a_new_model/tokenization_xxx.py +++ b/templates/adding_a_new_model/tokenization_xxx.py @@ -14,7 +14,6 @@ # limitations under the License. """ Tokenization class for model XXX.""" -from __future__ import absolute_import, division, print_function, unicode_literals import collections import logging diff --git a/tests/test_configuration_common.py b/tests/test_configuration_common.py index 39c8d6ce51..516aa0df13 100644 --- a/tests/test_configuration_common.py +++ b/tests/test_configuration_common.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import json import os diff --git a/tests/test_hf_api.py b/tests/test_hf_api.py index e6a51a77f0..cec8b9879b 100644 --- a/tests/test_hf_api.py +++ b/tests/test_hf_api.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import os import time diff --git a/tests/test_model_card.py b/tests/test_model_card.py index d6cece5f15..8064bef96d 100644 --- a/tests/test_model_card.py +++ b/tests/test_model_card.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import json import os diff --git a/tests/test_modeling_albert.py b/tests/test_modeling_albert.py index 67d4b1bbba..05d7aaefb5 100644 --- a/tests/test_modeling_albert.py +++ b/tests/test_modeling_albert.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_auto.py b/tests/test_modeling_auto.py index ab6ae3c691..1819415e6a 100644 --- a/tests/test_modeling_auto.py +++ b/tests/test_modeling_auto.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import logging import unittest diff --git a/tests/test_modeling_bert.py b/tests/test_modeling_bert.py index 3909e3e95e..946246ea2e 100644 --- a/tests/test_modeling_bert.py +++ b/tests/test_modeling_bert.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_common.py b/tests/test_modeling_common.py index 8fbd3374bb..02981b3fcc 100644 --- a/tests/test_modeling_common.py +++ b/tests/test_modeling_common.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import copy import json diff --git a/tests/test_modeling_ctrl.py b/tests/test_modeling_ctrl.py index b2fa4941ab..3d1a1cb2dc 100644 --- a/tests/test_modeling_ctrl.py +++ b/tests/test_modeling_ctrl.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_distilbert.py b/tests/test_modeling_distilbert.py index b63c50a8e0..96f4879166 100644 --- a/tests/test_modeling_distilbert.py +++ b/tests/test_modeling_distilbert.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_gpt2.py b/tests/test_modeling_gpt2.py index 55422d0ab7..3976c7d452 100644 --- a/tests/test_modeling_gpt2.py +++ b/tests/test_modeling_gpt2.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_openai.py b/tests/test_modeling_openai.py index ccc187357f..a2aaabb645 100644 --- a/tests/test_modeling_openai.py +++ b/tests/test_modeling_openai.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_roberta.py b/tests/test_modeling_roberta.py index 1994405e07..2a63ac232a 100644 --- a/tests/test_modeling_roberta.py +++ b/tests/test_modeling_roberta.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_t5.py b/tests/test_modeling_t5.py index 4c58a67972..964d5d4afe 100644 --- a/tests/test_modeling_t5.py +++ b/tests/test_modeling_t5.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_tf_albert.py b/tests/test_modeling_tf_albert.py index 130d0de8b1..fb7b269cdc 100644 --- a/tests/test_modeling_tf_albert.py +++ b/tests/test_modeling_tf_albert.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_tf_auto.py b/tests/test_modeling_tf_auto.py index cc9abaa03d..0b34ee4834 100644 --- a/tests/test_modeling_tf_auto.py +++ b/tests/test_modeling_tf_auto.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import logging import unittest diff --git a/tests/test_modeling_tf_bert.py b/tests/test_modeling_tf_bert.py index 140a4f4db2..d91d4863af 100644 --- a/tests/test_modeling_tf_bert.py +++ b/tests/test_modeling_tf_bert.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_tf_common.py b/tests/test_modeling_tf_common.py index 83f089eda9..1f1b7d6b26 100644 --- a/tests/test_modeling_tf_common.py +++ b/tests/test_modeling_tf_common.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import copy import os diff --git a/tests/test_modeling_tf_ctrl.py b/tests/test_modeling_tf_ctrl.py index 4c41f417cc..4997c2a573 100644 --- a/tests/test_modeling_tf_ctrl.py +++ b/tests/test_modeling_tf_ctrl.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_tf_distilbert.py b/tests/test_modeling_tf_distilbert.py index 7dd0ad23e2..4ecbe53ede 100644 --- a/tests/test_modeling_tf_distilbert.py +++ b/tests/test_modeling_tf_distilbert.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_tf_gpt2.py b/tests/test_modeling_tf_gpt2.py index 8c718a34f6..d7b0809964 100644 --- a/tests/test_modeling_tf_gpt2.py +++ b/tests/test_modeling_tf_gpt2.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_tf_openai_gpt.py b/tests/test_modeling_tf_openai_gpt.py index 3a624f1252..b825c94fca 100644 --- a/tests/test_modeling_tf_openai_gpt.py +++ b/tests/test_modeling_tf_openai_gpt.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_tf_roberta.py b/tests/test_modeling_tf_roberta.py index d924c5f5d7..21b0ffee0e 100644 --- a/tests/test_modeling_tf_roberta.py +++ b/tests/test_modeling_tf_roberta.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_tf_t5.py b/tests/test_modeling_tf_t5.py index 69272addda..d5589eaf16 100644 --- a/tests/test_modeling_tf_t5.py +++ b/tests/test_modeling_tf_t5.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_tf_transfo_xl.py b/tests/test_modeling_tf_transfo_xl.py index 62f81c45a4..f94f2032a2 100644 --- a/tests/test_modeling_tf_transfo_xl.py +++ b/tests/test_modeling_tf_transfo_xl.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import random import unittest diff --git a/tests/test_modeling_tf_xlm.py b/tests/test_modeling_tf_xlm.py index e62bae66c8..5160fde479 100644 --- a/tests/test_modeling_tf_xlm.py +++ b/tests/test_modeling_tf_xlm.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_tf_xlnet.py b/tests/test_modeling_tf_xlnet.py index 7b7570f889..65c83395e5 100644 --- a/tests/test_modeling_tf_xlnet.py +++ b/tests/test_modeling_tf_xlnet.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import random import unittest diff --git a/tests/test_modeling_transfo_xl.py b/tests/test_modeling_transfo_xl.py index 1e18aeb09b..b06bd85106 100644 --- a/tests/test_modeling_transfo_xl.py +++ b/tests/test_modeling_transfo_xl.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import random import unittest diff --git a/tests/test_modeling_xlm.py b/tests/test_modeling_xlm.py index 22897249aa..df5ac260fa 100644 --- a/tests/test_modeling_xlm.py +++ b/tests/test_modeling_xlm.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_modeling_xlnet.py b/tests/test_modeling_xlnet.py index e095a31e30..8b57e4ae82 100644 --- a/tests/test_modeling_xlnet.py +++ b/tests/test_modeling_xlnet.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import random import unittest diff --git a/tests/test_optimization.py b/tests/test_optimization.py index d6871420f4..4aa56a7949 100644 --- a/tests/test_optimization.py +++ b/tests/test_optimization.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import os import unittest diff --git a/tests/test_optimization_tf.py b/tests/test_optimization_tf.py index bff667fd3f..6236c31296 100644 --- a/tests/test_optimization_tf.py +++ b/tests/test_optimization_tf.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - import unittest from transformers import is_tf_available diff --git a/tests/test_tokenization_albert.py b/tests/test_tokenization_albert.py index 834cfef58c..3b325fb7bf 100644 --- a/tests/test_tokenization_albert.py +++ b/tests/test_tokenization_albert.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import os import unittest diff --git a/tests/test_tokenization_auto.py b/tests/test_tokenization_auto.py index 7afe543741..c2da723543 100644 --- a/tests/test_tokenization_auto.py +++ b/tests/test_tokenization_auto.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import logging import unittest diff --git a/tests/test_tokenization_bert.py b/tests/test_tokenization_bert.py index 6d64beb9b0..1a2e1393c0 100644 --- a/tests/test_tokenization_bert.py +++ b/tests/test_tokenization_bert.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import os import unittest diff --git a/tests/test_tokenization_bert_japanese.py b/tests/test_tokenization_bert_japanese.py index f8947e2a66..948b43884a 100644 --- a/tests/test_tokenization_bert_japanese.py +++ b/tests/test_tokenization_bert_japanese.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import os import unittest diff --git a/tests/test_tokenization_common.py b/tests/test_tokenization_common.py index 60ae6b523d..37b89a2533 100644 --- a/tests/test_tokenization_common.py +++ b/tests/test_tokenization_common.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import os import shutil diff --git a/tests/test_tokenization_ctrl.py b/tests/test_tokenization_ctrl.py index 89d9f78024..821d2cedb0 100644 --- a/tests/test_tokenization_ctrl.py +++ b/tests/test_tokenization_ctrl.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import json import os diff --git a/tests/test_tokenization_distilbert.py b/tests/test_tokenization_distilbert.py index 1e2084ee26..a142b8d8f9 100644 --- a/tests/test_tokenization_distilbert.py +++ b/tests/test_tokenization_distilbert.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + from transformers.tokenization_distilbert import DistilBertTokenizer diff --git a/tests/test_tokenization_gpt2.py b/tests/test_tokenization_gpt2.py index 3dea20d8c5..8bede8ee97 100644 --- a/tests/test_tokenization_gpt2.py +++ b/tests/test_tokenization_gpt2.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import json import os diff --git a/tests/test_tokenization_openai.py b/tests/test_tokenization_openai.py index fed01c9efe..a972ebe24f 100644 --- a/tests/test_tokenization_openai.py +++ b/tests/test_tokenization_openai.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import json import os diff --git a/tests/test_tokenization_roberta.py b/tests/test_tokenization_roberta.py index da60063356..9de7709030 100644 --- a/tests/test_tokenization_roberta.py +++ b/tests/test_tokenization_roberta.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import json import os diff --git a/tests/test_tokenization_t5.py b/tests/test_tokenization_t5.py index 62a1d148a7..061bc88598 100644 --- a/tests/test_tokenization_t5.py +++ b/tests/test_tokenization_t5.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import os import unittest diff --git a/tests/test_tokenization_transfo_xl.py b/tests/test_tokenization_transfo_xl.py index cd6c7c58f9..0efd016940 100644 --- a/tests/test_tokenization_transfo_xl.py +++ b/tests/test_tokenization_transfo_xl.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import os import unittest diff --git a/tests/test_tokenization_utils.py b/tests/test_tokenization_utils.py index d99ba2733f..11721f94c1 100644 --- a/tests/test_tokenization_utils.py +++ b/tests/test_tokenization_utils.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function + import unittest diff --git a/tests/test_tokenization_xlm.py b/tests/test_tokenization_xlm.py index 9f9dd8fbc4..ff7a005b30 100644 --- a/tests/test_tokenization_xlm.py +++ b/tests/test_tokenization_xlm.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import json import os diff --git a/tests/test_tokenization_xlnet.py b/tests/test_tokenization_xlnet.py index dcc270e683..d970f37f69 100644 --- a/tests/test_tokenization_xlnet.py +++ b/tests/test_tokenization_xlnet.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import, division, print_function, unicode_literals + import os import unittest