"llm/git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "86b907f82ad1cc5eb16e919d6cb5830765d73be4"
Commit 89fd2bb1 authored by Hongkun Yu's avatar Hongkun Yu Committed by A. Unique TensorFlower
Browse files

Py3 cleanup for nlp/

PiperOrigin-RevId: 339071563
parent 4085c19a
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
# ============================================================================== # ==============================================================================
"""The ALBERT configurations.""" """The ALBERT configurations."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import six import six
from official.nlp.bert import configs from official.nlp.bert import configs
......
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
# limitations under the License. # limitations under the License.
# ============================================================================== # ==============================================================================
"""A script to export the ALBERT core model as a TF-Hub SavedModel.""" """A script to export the ALBERT core model as a TF-Hub SavedModel."""
from __future__ import absolute_import
from __future__ import division
# from __future__ import google_type_annotations
from __future__ import print_function
# Import libraries # Import libraries
from absl import app from absl import app
......
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
# limitations under the License. # limitations under the License.
# ============================================================================== # ==============================================================================
"""Tests official.nlp.albert.export_albert_tfhub.""" """Tests official.nlp.albert.export_albert_tfhub."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import numpy as np import numpy as np
......
...@@ -14,11 +14,6 @@ ...@@ -14,11 +14,6 @@
# ============================================================================== # ==============================================================================
"""ALBERT classification finetuning runner in tf2.x.""" """ALBERT classification finetuning runner in tf2.x."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json import json
import os import os
# Import libraries # Import libraries
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
# ============================================================================== # ==============================================================================
"""Run ALBERT on SQuAD 1.1 and SQuAD 2.0 in TF 2.x.""" """Run ALBERT on SQuAD 1.1 and SQuAD 2.0 in TF 2.x."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json import json
import os import os
import time import time
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
# ============================================================================== # ==============================================================================
"""BERT models that are compatible with TF 2.0.""" """BERT models that are compatible with TF 2.0."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gin import gin
import tensorflow as tf import tensorflow as tf
import tensorflow_hub as hub import tensorflow_hub as hub
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# ============================================================================== # ==============================================================================
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf import tensorflow as tf
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
# ============================================================================== # ==============================================================================
"""The main BERT model and related functions.""" """The main BERT model and related functions."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy import copy
import json import json
......
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
# limitations under the License. # limitations under the License.
# ============================================================================== # ==============================================================================
"""A script to export the BERT core model as a TF-Hub SavedModel.""" """A script to export the BERT core model as a TF-Hub SavedModel."""
from __future__ import absolute_import
from __future__ import division
# from __future__ import google_type_annotations
from __future__ import print_function
# Import libraries # Import libraries
from absl import app from absl import app
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
# ============================================================================== # ==============================================================================
"""Tests official.nlp.bert.export_tfhub.""" """Tests official.nlp.bert.export_tfhub."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
from absl.testing import parameterized from absl.testing import parameterized
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
# ============================================================================== # ==============================================================================
"""BERT model input pipelines.""" """BERT model input pipelines."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf import tensorflow as tf
......
...@@ -14,11 +14,6 @@ ...@@ -14,11 +14,6 @@
# ============================================================================== # ==============================================================================
"""Utilities to save models.""" """Utilities to save models."""
from __future__ import absolute_import
from __future__ import division
# from __future__ import google_type_annotations
from __future__ import print_function
import os import os
from absl import logging from absl import logging
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
# ============================================================================== # ==============================================================================
"""A light weight utilities to train NLP models.""" """A light weight utilities to train NLP models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json import json
import os import os
import tempfile import tempfile
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
# ============================================================================== # ==============================================================================
"""Tests for official.modeling.training.model_training_utils.""" """Tests for official.modeling.training.model_training_utils."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
from absl import logging from absl import logging
......
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
# limitations under the License. # limitations under the License.
# ============================================================================== # ==============================================================================
"""BERT classification or regression finetuning runner in TF 2.x.""" """BERT classification or regression finetuning runner in TF 2.x."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools import functools
import json import json
......
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
# limitations under the License. # limitations under the License.
# ============================================================================== # ==============================================================================
"""Run masked LM/next sentence pre-training for BERT in TF 2.x.""" """Run masked LM/next sentence pre-training for BERT in TF 2.x."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# Import libraries # Import libraries
from absl import app from absl import app
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
# ============================================================================== # ==============================================================================
"""Run BERT on SQuAD 1.1 and SQuAD 2.0 in TF 2.x.""" """Run BERT on SQuAD 1.1 and SQuAD 2.0 in TF 2.x."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json import json
import os import os
import time import time
......
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
# limitations under the License. # limitations under the License.
# ============================================================================== # ==============================================================================
"""Library for running BERT family models on SQuAD 1.1/2.0 in TF 2.x.""" """Library for running BERT family models on SQuAD 1.1/2.0 in TF 2.x."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections import collections
import json import json
......
...@@ -22,10 +22,6 @@ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, Percy Liang ...@@ -22,10 +22,6 @@ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, Percy Liang
https://nlp.stanford.edu/pubs/rajpurkar2016squad.pdf https://nlp.stanford.edu/pubs/rajpurkar2016squad.pdf
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections import collections
import re import re
import string import string
......
...@@ -22,10 +22,6 @@ This file is expected to map question ID's to the model's predicted probability ...@@ -22,10 +22,6 @@ This file is expected to map question ID's to the model's predicted probability
that a question is unanswerable. that a question is unanswerable.
""" """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections import collections
import re import re
import string import string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment