diff --git a/paddlepalm/__init__.py b/paddlepalm/__init__.py index 4010d841a916b5fc77971adba1584a83e7d157e5..20f446fbf9063f08f13b45543b583ca58445d4dd 100644 --- a/paddlepalm/__init__.py +++ b/paddlepalm/__init__.py @@ -1,15 +1,15 @@ -import downloader +from . import downloader # from mtl_controller import Controller #import controller -import optimizer -import lr_sched -import backbone -import reader -import head +from . import optimizer +from . import lr_sched +from . import backbone +from . import reader +from . import head -from trainer import Trainer -from multihead_trainer import MultiHeadTrainer +from .trainer import Trainer +from .multihead_trainer import MultiHeadTrainer #del interface #del task_instance diff --git a/paddlepalm/backbone/__init__.py b/paddlepalm/backbone/__init__.py index 9f98d7a6659548e322b5218c54bf53f73562b99d..bd619e257712ba1ce4403ffc3e9fae23101d32fa 100644 --- a/paddlepalm/backbone/__init__.py +++ b/paddlepalm/backbone/__init__.py @@ -1,4 +1,4 @@ -from ernie import ERNIE -from bert import BERT +from .ernie import ERNIE +from .bert import BERT diff --git a/paddlepalm/distribute/__init__.py b/paddlepalm/distribute/__init__.py index bff6594676be1cd2e5e7f3882903a67a50e1fcfa..6692331bcc9278c2f930ad93d65c889e14a1ffea 100644 --- a/paddlepalm/distribute/__init__.py +++ b/paddlepalm/distribute/__init__.py @@ -5,5 +5,5 @@ import multiprocessing gpu_dev_count = int(fluid.core.get_cuda_device_count()) cpu_dev_count = int(os.environ.get('CPU_NUM', multiprocessing.cpu_count())) -from reader import yield_pieces, data_feeder, decode_fake +from .reader import yield_pieces, data_feeder, decode_fake diff --git a/paddlepalm/downloader.py b/paddlepalm/downloader.py index 74b70e357d4a2a9fe22024bf9c91545959ffcc4b..06164c89971bda33d348f3dab0f581d35715b701 100644 --- a/paddlepalm/downloader.py +++ b/paddlepalm/downloader.py @@ -1 +1 @@ -from _downloader import * \ No newline at end of file +from ._downloader import * diff --git a/paddlepalm/head/__init__.py b/paddlepalm/head/__init__.py index 5a52e4c3b8a41fd203cf60fe2a6b2ab40fa319b2..7a442768ba7f64421b5c914a82003114e8de2ba7 100644 --- a/paddlepalm/head/__init__.py +++ b/paddlepalm/head/__init__.py @@ -1,6 +1,6 @@ -from cls import Classify -from match import Match -from ner import SequenceLabel -from mrc import MRC -from mlm import MaskLM +from .cls import Classify +from .match import Match +from .ner import SequenceLabel +from .mrc import MRC +from .mlm import MaskLM diff --git a/paddlepalm/lr_sched/__init__.py b/paddlepalm/lr_sched/__init__.py index 2ec4ed386f8e83385db8459410ed72ddf66c3023..91b3891b62bacf78ee6ef94fd61fdad307d28fde 100644 --- a/paddlepalm/lr_sched/__init__.py +++ b/paddlepalm/lr_sched/__init__.py @@ -1,4 +1,4 @@ -from slanted_triangular_schedualer import TriangularSchedualer -from warmup_schedualer import WarmupSchedualer +from .slanted_triangular_schedualer import TriangularSchedualer +from .warmup_schedualer import WarmupSchedualer diff --git a/paddlepalm/optimizer/__init__.py b/paddlepalm/optimizer/__init__.py index 72430e58230e585317fb1e3397a6f8763775adf3..ae2934082b70785410be5a8424cef508e69bd383 100644 --- a/paddlepalm/optimizer/__init__.py +++ b/paddlepalm/optimizer/__init__.py @@ -1,2 +1,2 @@ -from adam import Adam +from .adam import Adam diff --git a/paddlepalm/reader/__init__.py b/paddlepalm/reader/__init__.py index 0162c412f29fef662399ade6a73966db8405a579..1de3d76051ed4a2f6013e1a0dc9c8456f05d004d 100644 --- a/paddlepalm/reader/__init__.py +++ b/paddlepalm/reader/__init__.py @@ -1,6 +1,6 @@ -from cls import ClassifyReader -from match import MatchReader -from seq_label import SequenceLabelReader -from mrc import MRCReader -from mlm import MaskLMReader +from .cls import ClassifyReader +from .match import MatchReader +from .seq_label import SequenceLabelReader +from .mrc import MRCReader +from .mlm import MaskLMReader diff --git a/paddlepalm/utils/__init__.py b/paddlepalm/utils/__init__.py index d362471c9c3312bd333d7d2b21663b5d5cc6b500..6fee7b30bf215f6ab94cd833181e76a5afe6ec57 100644 --- a/paddlepalm/utils/__init__.py +++ b/paddlepalm/utils/__init__.py @@ -1,4 +1,4 @@ -import basic_helper -import config_helper +from . import basic_helper +from . import config_helper diff --git a/paddlepalm/utils/basic_helper.py b/paddlepalm/utils/basic_helper.py index a9d503472d855cc70db2ca6d7f8eddd31a69b223..a6b997cb1938999c05e3a41a4b6403b566ea2005 100644 --- a/paddlepalm/utils/basic_helper.py +++ b/paddlepalm/utils/basic_helper.py @@ -2,7 +2,7 @@ import os import json import yaml -from config_helper import PDConfig +from .config_helper import PDConfig import logging from paddle import fluid