__init__.py 2.4 KB
Newer Older
S
Steffy-zxf 已提交
1
#coding:utf-8
W
wuzewu 已提交
2
# Copyright (c) 2019  PaddlePaddle Authors. All Rights Reserved.
Z
Zeyu Chen 已提交
3 4 5 6 7 8 9 10 11 12 13 14
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.
15
import os
16 17
import six

18 19
os.environ["FLAGS_eager_delete_tensor_gb"] = "0.0"

S
Steffy-zxf 已提交
20 21
if six.PY2:
    import sys
W
wuzewu 已提交
22
    reload(sys)  # noqa
S
Steffy-zxf 已提交
23 24
    sys.setdefaultencoding("UTF-8")

W
wuzewu 已提交
25
from . import module
Z
Zeyu Chen 已提交
26
from . import common
W
wuzewu 已提交
27
from . import io
28
from . import dataset
Z
Zeyu Chen 已提交
29
from . import finetune
Z
Zeyu Chen 已提交
30
from . import reader
31
from . import network
Z
Zeyu Chen 已提交
32 33 34 35 36

from .common.dir import USER_HOME
from .common.dir import HUB_HOME
from .common.dir import MODULE_HOME
from .common.dir import CACHE_HOME
B
BinLong 已提交
37
from .common.dir import CONF_HOME
Z
Zeyu Chen 已提交
38 39
from .common.logger import logger
from .common.paddle_helper import connect_program
K
kinghuin 已提交
40 41
from .common.hub_server import HubServer
from .common.hub_server import server_check
W
wuzewu 已提交
42
from .common.downloader import download, ResourceNotFoundError, ServerConnectionError
Z
Zeyu Chen 已提交
43

W
wuzewu 已提交
44
from .module.module import Module
W
wuzewu 已提交
45
from .module.base_processor import BaseProcessor
W
wuzewu 已提交
46
from .module.signature import Signature, create_signature
W
wuzewu 已提交
47
from .module.manager import default_module_manager
Z
Zeyu Chen 已提交
48

W
wuzewu 已提交
49
from .io.type import DataType
Z
Zeyu Chen 已提交
50

51
from .finetune.task import BaseTask
W
wuzewu 已提交
52
from .finetune.task import ClassifierTask
J
jayhenry 已提交
53
from .finetune.task import DetectionTask
W
wuzewu 已提交
54 55 56
from .finetune.task import TextClassifierTask
from .finetune.task import ImageClassifierTask
from .finetune.task import SequenceLabelTask
S
Steffy-zxf 已提交
57
from .finetune.task import MultiLabelClassifierTask
K
kinghuin 已提交
58 59
from .finetune.task import RegressionTask
from .finetune.task import ReadingComprehensionTask
60
from .finetune.config import RunConfig
61
from .finetune.strategy import AdamWeightDecayStrategy
Z
Zeyu Chen 已提交
62
from .finetune.strategy import DefaultStrategy
S
Steffy-zxf 已提交
63
from .finetune.strategy import DefaultFinetuneStrategy
K
kinghuin 已提交
64 65 66
from .finetune.strategy import L2SPFinetuneStrategy
from .finetune.strategy import ULMFiTStrategy
from .finetune.strategy import CombinedStrategy
S
Steffy-zxf 已提交
67 68

from .autofinetune.evaluator import report_final_result
69

S
Steffy-zxf 已提交
70
from .module.nlp_module import NLPPredictionModule, TransformerModule