You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
p = pipeline(
Tasks.named_entity_recognition,
'D:/PyCharm Community Edition 2024.1.1/workspace/SMNER/adaseq/experiments/RiVEG-twitter-10000/241128164248.201824/output_best' # 绝对路径
)
result = p('1984年出生,中国国籍,汉族,硕士学历')
print(result)
What's your environment?
AdaSeq Version (e.g., 1.0 or master):
ModelScope Version (e.g., 1.0 or master):
PyTorch Version (e.g., 1.12.1):
OS (e.g., Ubuntu 20.04):
Python version:
CUDA/cuDNN version:
GPU models and configuration:
Any other relevant information:
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
File "D:\PyCharm Community Edition 2024.1.1\workspace\SMNER\adaseq\adaseq\data\preprocessors\nlp_preprocessor.py", line 108, in call
output_dict['origin_mask'] = data['mask']
KeyError: 'mask'
What is your question?
在训练完NER模型后进行推理,报错KeyError: 'mask'
What have you tried?
No response
Code (if necessary)
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
import os
os.environ['HTTP_PROXY'] = 'http://127.0.0.1:7897'
os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:7897'
p = pipeline(
Tasks.named_entity_recognition,
'D:/PyCharm Community Edition 2024.1.1/workspace/SMNER/adaseq/experiments/RiVEG-twitter-10000/241128164248.201824/output_best' # 绝对路径
)
result = p('1984年出生,中国国籍,汉族,硕士学历')
print(result)
What's your environment?
Code of Conduct
The text was updated successfully, but these errors were encountered: