Closed SoaringTiger closed 3 years ago
例如 ddp = DDParser(encoding_model='transformer') 报错 File "/usr/local/lib/python3.8/site-packages/ddparser/parser/data_struct/utils.py", line 295, in download_model_from_url download_model_path = DOWNLOAD_MODEL_PATH_DICT[model] KeyError: 'transformer'
ddp = DDParser(encoding_model='transformer')
File "/usr/local/lib/python3.8/site-packages/ddparser/parser/data_struct/utils.py", line 295, in download_model_from_url download_model_path = DOWNLOAD_MODEL_PATH_DICT[model] KeyError: 'transformer'
原因应是 DOWNLOAD_MODEL_PATH_DICT 中只有一个模型 DOWNLOAD_MODEL_PATH_DICT = { 'ernie-lstm': "https://ddparser.bj.bcebos.com/DDParser-ernie-lstm-1.0.3.tar.gz", } 而 download_model_from_url函数中并未检查 model in DOWNLOAD_MODEL_PATH_DICT download_model_path = DOWNLOAD_MODEL_PATH_DICT[model]
DOWNLOAD_MODEL_PATH_DICT = { 'ernie-lstm': "https://ddparser.bj.bcebos.com/DDParser-ernie-lstm-1.0.3.tar.gz", }
download_model_path = DOWNLOAD_MODEL_PATH_DICT[model]
请问文档里提到的其它几个模型还支持吗? lstm, transformer, ernie-1.0, ernie-tiny
暂时没有发布其他几个模型的计划。 ernie-lstm的速度和效果比lstm和transformer更好一些
收到。
例如
ddp = DDParser(encoding_model='transformer')
报错File "/usr/local/lib/python3.8/site-packages/ddparser/parser/data_struct/utils.py", line 295, in download_model_from_url download_model_path = DOWNLOAD_MODEL_PATH_DICT[model] KeyError: 'transformer'
原因应是 DOWNLOAD_MODEL_PATH_DICT 中只有一个模型
DOWNLOAD_MODEL_PATH_DICT = { 'ernie-lstm': "https://ddparser.bj.bcebos.com/DDParser-ernie-lstm-1.0.3.tar.gz", }
而 download_model_from_url函数中并未检查 model in DOWNLOAD_MODEL_PATH_DICTdownload_model_path = DOWNLOAD_MODEL_PATH_DICT[model]
请问文档里提到的其它几个模型还支持吗? lstm, transformer, ernie-1.0, ernie-tiny