Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into autonlp_trainer
Browse files Browse the repository at this point in the history
  • Loading branch information
sijunhe committed Dec 27, 2022
2 parents 56f9f14 + 52d7f11 commit 4252a4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion applications/information_extraction/document/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ from paddlenlp import Taskflow
from paddlenlp.utils.doc_parser import DocParser

schema = ['开票日期', '名称', '纳税人识别号', '开户行及账号', '金额', '价税合计', 'No', '税率', '地址、电话', '税额']
my_ie = Taskflow("information_extraction", schema=schema, task_path='./checkpoint/model_best', precison='fp16')
my_ie = Taskflow("information_extraction", model="uie-x-base", schema=schema, task_path='./checkpoint/model_best', precison='fp16')
```

我们可以根据设置的`schema`,对指定的`doc_path`文档进行信息抽取并进行可视化:
Expand Down
9 changes: 5 additions & 4 deletions paddlenlp/transformers/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,11 @@ def __getattr__(self, name):
except AttributeError:
result = getattr(self.config, name)

logger.warning(
f"Do not access config from `model.{name}` which will be deprecated after v2.6.0, "
f"Instead, do `model.config.{name}`"
)
# FIXME(wj-Mcat): there are a lot of consistent errors, so temporary disable.
# logger.warning(
# f"Do not access config from `model.{name}` which will be deprecated after v2.6.0, "
# f"Instead, do `model.config.{name}`"
# )
return result

@property
Expand Down

0 comments on commit 4252a4a

Please sign in to comment.