提交 605cb869 编写于 作者: W wuzewu

modify the import order to comply with the PEP8 specification

上级 2a93e018
...@@ -19,7 +19,6 @@ from __future__ import print_function ...@@ -19,7 +19,6 @@ from __future__ import print_function
import argparse import argparse
import os import os
from paddlehub.common.logger import logger
from paddlehub.common import utils from paddlehub.common import utils
from paddlehub.common.downloader import default_downloader from paddlehub.common.downloader import default_downloader
from paddlehub.common.hub_server import default_hub_server from paddlehub.common.hub_server import default_hub_server
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# 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 absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import argparse import argparse
from paddlehub.common.logger import logger
from paddlehub.common import utils from paddlehub.common import utils
from paddlehub.module.manager import default_module_manager from paddlehub.module.manager import default_module_manager
from paddlehub.commands.base_command import BaseCommand, ENTRY from paddlehub.commands.base_command import BaseCommand, ENTRY
......
...@@ -16,7 +16,6 @@ from __future__ import absolute_import ...@@ -16,7 +16,6 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
from paddlehub.common.logger import logger
from paddlehub.common import utils from paddlehub.common import utils
from paddlehub.common.downloader import default_downloader from paddlehub.common.downloader import default_downloader
from paddlehub.module.manager import default_module_manager from paddlehub.module.manager import default_module_manager
......
...@@ -19,7 +19,6 @@ from __future__ import print_function ...@@ -19,7 +19,6 @@ from __future__ import print_function
import argparse import argparse
import os import os
from paddlehub.common.logger import logger
from paddlehub.commands.base_command import BaseCommand, ENTRY from paddlehub.commands.base_command import BaseCommand, ENTRY
from paddlehub.io.parser import yaml_parser, txt_parser from paddlehub.io.parser import yaml_parser, txt_parser
from paddlehub.module.manager import default_module_manager from paddlehub.module.manager import default_module_manager
......
...@@ -18,7 +18,6 @@ from __future__ import print_function ...@@ -18,7 +18,6 @@ from __future__ import print_function
import argparse import argparse
from paddlehub.common.logger import logger
from paddlehub.common import utils from paddlehub.common import utils
from paddlehub.common.hub_server import default_hub_server from paddlehub.common.hub_server import default_hub_server
from paddlehub.commands.base_command import BaseCommand, ENTRY from paddlehub.commands.base_command import BaseCommand, ENTRY
......
...@@ -19,7 +19,6 @@ from __future__ import print_function ...@@ -19,7 +19,6 @@ from __future__ import print_function
import os import os
import argparse import argparse
from paddlehub.common.logger import logger
from paddlehub.common import utils from paddlehub.common import utils
from paddlehub.commands.base_command import BaseCommand, ENTRY from paddlehub.commands.base_command import BaseCommand, ENTRY
from paddlehub.commands.cml_utils import TablePrinter from paddlehub.commands.cml_utils import TablePrinter
......
...@@ -18,7 +18,6 @@ from __future__ import print_function ...@@ -18,7 +18,6 @@ from __future__ import print_function
import argparse import argparse
from paddlehub.common.logger import logger
from paddlehub.common import utils from paddlehub.common import utils
from paddlehub.module.manager import default_module_manager from paddlehub.module.manager import default_module_manager
from paddlehub.commands.base_command import BaseCommand, ENTRY from paddlehub.commands.base_command import BaseCommand, ENTRY
......
...@@ -16,7 +16,6 @@ from __future__ import absolute_import ...@@ -16,7 +16,6 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
from paddlehub.common.logger import logger
from paddlehub import version from paddlehub import version
from paddlehub.commands.base_command import BaseCommand from paddlehub.commands.base_command import BaseCommand
......
...@@ -16,9 +16,10 @@ from __future__ import absolute_import ...@@ -16,9 +16,10 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import six
import distutils.util import distutils.util
import six
from paddlehub.common.logger import logger from paddlehub.common.logger import logger
......
...@@ -23,7 +23,6 @@ import sys ...@@ -23,7 +23,6 @@ import sys
import time import time
import hashlib import hashlib
import requests import requests
import tempfile
import tarfile import tarfile
from paddlehub.common import utils from paddlehub.common import utils
......
...@@ -16,9 +16,10 @@ from __future__ import absolute_import ...@@ -16,9 +16,10 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import copy
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import copy
from paddlehub.module import module_desc_pb2 from paddlehub.module import module_desc_pb2
from paddlehub.common.utils import from_pyobj_to_module_attr, from_module_attr_to_pyobj from paddlehub.common.utils import from_pyobj_to_module_attr, from_module_attr_to_pyobj
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
# 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
from collections import namedtuple from collections import namedtuple
import os import os
import csv import csv
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
# 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
class InputExample(object): class InputExample(object):
""" """
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
# 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
from collections import namedtuple from collections import namedtuple
import os import os
import csv import csv
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
# 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 os import os
import csv import csv
import json import json
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
# 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
from collections import namedtuple from collections import namedtuple
import os import os
import csv import csv
......
...@@ -12,9 +12,13 @@ ...@@ -12,9 +12,13 @@
# 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.
import time from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from datetime import datetime from datetime import datetime
import time
from paddlehub.finetune.strategy import DefaultStrategy from paddlehub.finetune.strategy import DefaultStrategy
from paddlehub.common.logger import logger from paddlehub.common.logger import logger
......
...@@ -19,10 +19,10 @@ from __future__ import print_function ...@@ -19,10 +19,10 @@ from __future__ import print_function
import time import time
import paddle.fluid as fluid import paddle.fluid as fluid
import paddlehub as hub
import numpy as np import numpy as np
from paddlehub.common.logger import logger from paddlehub.common.logger import logger
import paddlehub as hub
def evaluate_cls_task(task, data_reader, feed_list, phase="test", config=None): def evaluate_cls_task(task, data_reader, feed_list, phase="test", config=None):
......
...@@ -21,14 +21,14 @@ import time ...@@ -21,14 +21,14 @@ import time
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddlehub as hub
import numpy as np import numpy as np
from visualdl import LogWriter
from paddlehub.common.logger import logger from paddlehub.common.logger import logger
from paddlehub.finetune.strategy import BERTFinetuneStrategy, DefaultStrategy from paddlehub.finetune.strategy import BERTFinetuneStrategy, DefaultStrategy
from paddlehub.finetune.checkpoint import load_checkpoint, save_checkpoint from paddlehub.finetune.checkpoint import load_checkpoint, save_checkpoint
from paddlehub.finetune.evaluate import evaluate_cls_task, evaluate_seq_labeling_task from paddlehub.finetune.evaluate import evaluate_cls_task, evaluate_seq_labeling_task
from visualdl import LogWriter import paddlehub as hub
def _do_memory_optimization(task, config): def _do_memory_optimization(task, config):
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# 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 absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
......
...@@ -12,8 +12,13 @@ ...@@ -12,8 +12,13 @@
# 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 os import os
import multiprocessing import multiprocessing
import paddle.fluid as fluid import paddle.fluid as fluid
from paddlehub.finetune.optimization import adam_weight_decay_optimization from paddlehub.finetune.optimization import adam_weight_decay_optimization
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
# 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 os import os
import collections import collections
import time import time
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
# 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 yaml import yaml
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
# 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
from enum import Enum from enum import Enum
from PIL import Image from PIL import Image
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# 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 absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
......
...@@ -12,11 +12,16 @@ ...@@ -12,11 +12,16 @@
# 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 csv import csv
import json import json
import numpy as np
from collections import namedtuple from collections import namedtuple
import numpy as np
from paddlehub.reader import tokenization from paddlehub.reader import tokenization
from paddlehub.common.logger import logger from paddlehub.common.logger import logger
from .batching import pad_batch_data from .batching import pad_batch_data
......
...@@ -20,6 +20,7 @@ from __future__ import print_function ...@@ -20,6 +20,7 @@ from __future__ import print_function
import collections import collections
import unicodedata import unicodedata
import six import six
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册