test
This commit is contained in:
parent
bcd8c005b3
commit
7fc0f81836
2
setup.py
2
setup.py
|
@ -1,7 +1,7 @@
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
setup(
|
setup(
|
||||||
name='deepke', # 打包后的包文件名
|
name='deepke', # 打包后的包文件名
|
||||||
version='0.2.60', #版本号
|
version='0.2.61', #版本号
|
||||||
keywords=["pip", "RE","NER","AE"], # 关键字
|
keywords=["pip", "RE","NER","AE"], # 关键字
|
||||||
description='DeepKE 是基于 Pytorch 的深度学习中文关系抽取处理套件。', # 说明
|
description='DeepKE 是基于 Pytorch 的深度学习中文关系抽取处理套件。', # 说明
|
||||||
long_description="client", #详细说明
|
long_description="client", #详细说明
|
||||||
|
|
|
@ -407,7 +407,7 @@ def _no_beam_search_generate(decoder: PromptBartDecoder, state, tokens=None, max
|
||||||
eos_token_id=None,
|
eos_token_id=None,
|
||||||
repetition_penalty=1.0, length_penalty=1.0, pad_token_id=0,
|
repetition_penalty=1.0, length_penalty=1.0, pad_token_id=0,
|
||||||
restricter=None):
|
restricter=None):
|
||||||
device = _get_model_device(decoder)
|
device = get_model_device(decoder)
|
||||||
if tokens is None:
|
if tokens is None:
|
||||||
if bos_token_id is None:
|
if bos_token_id is None:
|
||||||
raise RuntimeError("You have to specify either `tokens` or `bos_token_id`.")
|
raise RuntimeError("You have to specify either `tokens` or `bos_token_id`.")
|
||||||
|
@ -492,7 +492,7 @@ def _beam_search_generate(decoder: PromptBartDecoder, tokens=None, state=None, m
|
||||||
restricter=None) -> torch.LongTensor:
|
restricter=None) -> torch.LongTensor:
|
||||||
assert do_sample is False
|
assert do_sample is False
|
||||||
# beam search
|
# beam search
|
||||||
device = _get_model_device(decoder)
|
device = get_model_device(decoder)
|
||||||
if tokens is None:
|
if tokens is None:
|
||||||
if bos_token_id is None:
|
if bos_token_id is None:
|
||||||
raise RuntimeError("You have to specify either `tokens` or `bos_token_id`.")
|
raise RuntimeError("You have to specify either `tokens` or `bos_token_id`.")
|
||||||
|
|
Loading…
Reference in New Issue