Merge branch 'PaddlePaddle:develop' into develop

pull/2932/head
HuangLiangJie 3 years ago committed by GitHub
commit 0ab7fb0f62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
.github/stale.yml vendored

@ -6,7 +6,8 @@ daysUntilClose: 30
exemptLabels:
- Roadmap
- Bug
- New Feature
- feature request
- Tips
# Label to use when marking an issue as stale
staleLabel: Stale
# Comment to post when marking an issue as stale. Set to `false` to disable
@ -17,4 +18,4 @@ markComment: >
unmarkComment: false
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue is closed. Please re-open if needed.
This issue is closed. Please re-open if needed.

@ -127,7 +127,7 @@ class TextExecutor(BaseExecutor):
if self.task == 'punc':
# punc list
self._punc_list = []
with open(self.vocab_file, 'r') as f:
with open(self.vocab_file, 'r', encoding='utf-8') as f:
for line in f:
self._punc_list.append(line.strip())
@ -178,12 +178,12 @@ class TextExecutor(BaseExecutor):
if self.task == 'punc':
# punc list
self._punc_list = []
with open(self.vocab_file, 'r') as f:
with open(self.vocab_file, 'r', encoding='utf-8') as f:
for line in f:
self._punc_list.append(line.strip())
# model
with open(self.cfg_path) as f:
with open(self.cfg_path, 'r', encoding='utf-8') as f:
config = CfgNode(yaml.safe_load(f))
self.model = ErnieLinear(**config["model"])

Loading…
Cancel
Save