diff --git a/fastNLP/io/file_utils.py b/fastNLP/io/file_utils.py index a0bfa88a..ff33872b 100644 --- a/fastNLP/io/file_utils.py +++ b/fastNLP/io/file_utils.py @@ -557,4 +557,4 @@ def _get_file_name_base_on_postfix(dir_path, postfix): raise FileNotFoundError(f"There is no file endswith {postfix} file in {dir_path}") elif len(files) > 1: raise FileExistsError(f"There are multiple *{postfix} files in {dir_path}") - return os.path.join(dir_path, files[0]) \ No newline at end of file + return os.path.join(dir_path, files[0]) diff --git a/fastNLP/modules/encoder/bert.py b/fastNLP/modules/encoder/bert.py index da9cc6d6..4e8d644f 100644 --- a/fastNLP/modules/encoder/bert.py +++ b/fastNLP/modules/encoder/bert.py @@ -15,7 +15,7 @@ import torch from torch import nn import numpy as np -from fastNLP.io.file_utils import _get_file_name_base_on_postfix +from ...io.file_utils import _get_file_name_base_on_postfix from ...io.file_utils import _get_bert_dir from ...core import logger