Browse Source

[bugfix] fix an import error

tags/v0.5.5
Yige Xu 5 years ago
parent
commit
f0e1bdade8
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      fastNLP/io/file_utils.py
  2. +1
    -1
      fastNLP/modules/encoder/bert.py

+ 1
- 1
fastNLP/io/file_utils.py View File

@@ -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])
return os.path.join(dir_path, files[0])

+ 1
- 1
fastNLP/modules/encoder/bert.py View File

@@ -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



Loading…
Cancel
Save