-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NER 任务中出现KeyError报错 #117
Comments
你好,在最开始安装依赖包的时候,如果通过pip install deepke的形式安装,修改的代码是不会生效的,得通过python setup.py install的方式才能生效 |
我尝试了修改完代码之后再python setup.py install,但还是报错。
此外,除了修改 get_labels 函数外,我还想问一下是否还有其他需要修改的地方?
期待您的回复,谢谢!
…------------------ 原始邮件 ------------------
发件人: "zjunlp/DeepKE" ***@***.***>;
发送时间: 2022年6月15日(星期三) 晚上7:23
***@***.***>;
***@***.******@***.***>;
主题: Re: [zjunlp/DeepKE] NER 任务中出现KeyError报错 (Issue #117)
你好,在最开始安装依赖包的时候,如果通过pip install deepke的形式安装,修改的代码是不会生效的,得通过python setup.py install的方式才能生效
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
有通过pip install deepke的方式安装过么,如果有的话需要讲之前装的卸载掉再重新安装 |
第一次pip安装过,但是可能因为网络问题安装失败,随后又转为python setup.py 安装
…------------------ 原始邮件 ------------------
发件人: "zjunlp/DeepKE" ***@***.***>;
发送时间: 2022年6月15日(星期三) 晚上7:31
***@***.***>;
***@***.******@***.***>;
主题: Re: [zjunlp/DeepKE] NER 任务中出现KeyError报错 (Issue #117)
有通过pip install deepke的方式安装过么
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
可以在这报错之前,print(label_list)看看 |
数据读取貌似没有异常,除get_lable函数之外,还有其他需要修改的么?
麻烦您啦
…------------------ 原始邮件 ------------------
发件人: "zjunlp/DeepKE" ***@***.***>;
发送时间: 2022年6月15日(星期三) 晚上7:39
***@***.***>;
***@***.******@***.***>;
主题: Re: [zjunlp/DeepKE] NER 任务中出现KeyError报错 (Issue #117)
可以在这报错之前,print(label_list)看看
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
其他地方就没需要改的了,你可以上传你的代码到自己仓库,我再看一看 |
我已将我的代码上传至我的GitHub仓库:https://github.com/ZZQ908268856/ner.git
感谢帮助
…------------------ 原始邮件 ------------------
发件人: "zjunlp/DeepKE" ***@***.***>;
发送时间: 2022年6月15日(星期三) 晚上7:50
***@***.***>;
***@***.******@***.***>;
主题: Re: [zjunlp/DeepKE] NER 任务中出现KeyError报错 (Issue #117)
其他地方就没需要改的了,你可以上传你的代码到自己仓库,我再看一看
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
训练数据能传一小部分上去吗 |
今晚网络太差,我尝试了几次都未能成功,我明天重新弄一下。
…------------------ 原始邮件 ------------------
发件人: tlk1997 ***@***.***>
发送时间: 2022年6月15日 22:28
收件人: zjunlp/DeepKE ***@***.***>
抄送: ZZQ908268856 ***@***.***>, Author ***@***.***>
主题: Re: [zjunlp/DeepKE] NER 任务中出现KeyError报错 (Issue #117)
训练数据能传一小部分上去吗
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
早上好,新的小样本训练数据代码已重新上传:https://github.com/ZZQ908268856/ner.git。路径:ner/example/ner/standard/data
劳烦查看!
…------------------ 原始邮件 ------------------
发件人: "zjunlp/DeepKE" ***@***.***>;
发送时间: 2022年6月15日(星期三) 晚上10:28
***@***.***>;
***@***.******@***.***>;
主题: Re: [zjunlp/DeepKE] NER 任务中出现KeyError报错 (Issue #117)
训练数据能传一小部分上去吗
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
好,我下午看看 |
我用你数据和给的代码是可以跑通的,修改后代码是不是没在运行python setup.py develop? |
你是直接用我的代码和数据跑的吗?我这边按照你说的步骤试了好几次,还是会出现keyerror的错误信息:
908268856
***@***.***
…------------------ 原始邮件 ------------------
发件人: "zjunlp/DeepKE" ***@***.***>;
发送时间: 2022年6月16日(星期四) 中午12:45
***@***.***>;
***@***.******@***.***>;
主题: Re: [zjunlp/DeepKE] NER 任务中出现KeyError报错 (Issue #117)
我用你数据和给的代码是可以跑通的,修改后代码是不是没在运行python setup.py develop?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
是的,在linux和mac环境下都跑了没问题 |
我在 Linux 环境下运行步骤如下:
1. 创建虚拟环境:python3.8 ,pytorch1.5
2. cd 到主文件夹下分别运行:python setup.py install 和 python setup.py develop
3. cd 到 /example/ner/standard 文件夹下,运行 python run.py
上述步骤没有问题吧?我 python run.py之后就一直报刚才那个错误了,好纳闷啊
908268856
***@***.***
…------------------ 原始邮件 ------------------
发件人: "zjunlp/DeepKE" ***@***.***>;
发送时间: 2022年6月16日(星期四) 下午5:42
***@***.***>;
***@***.******@***.***>;
主题: Re: [zjunlp/DeepKE] NER 任务中出现KeyError报错 (Issue #117)
是的,在linux和mac环境下都跑了没问题
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
没问题,留个qq聊一下吧 |
908268856
…------------------ 原始邮件 ------------------
发件人: tlk1997 ***@***.***>
发送时间: 2022年6月16日 18:24
收件人: zjunlp/DeepKE ***@***.***>
抄送: ZZQ908268856 ***@***.***>, Author ***@***.***>
主题: Re: [zjunlp/DeepKE] NER 任务中出现KeyError报错 (Issue #117)
没问题,留个qq聊一下吧
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
在NER任务中,执行python run_bert.py 会报网络错误Connection to huggingface.co timed out('HTTPSConnectionPool(host='huggingface.co', port=443):), 请问如果换成镜像要修改那个配置吗?如果已经将bert-base-chinese模型下载本地,请问要在哪里修改配置路径吗? |
Describe the question
Environment (please complete the following information):
Linux
python 3.8
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: