Skip to content
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

新数据集的训练 #46

Closed
1 of 5 tasks
xxllp opened this issue Aug 5, 2022 · 18 comments
Closed
1 of 5 tasks

新数据集的训练 #46

xxllp opened this issue Aug 5, 2022 · 18 comments
Labels
question Further information is requested

Comments

@xxllp
Copy link

xxllp commented Aug 5, 2022

Agreement

  • Fill the space in brackets with x to check the agreement items.
  • Before submitting this issue, I've fully checked the instructions in README.md.
  • Before submitting this issue, I'd searched in the issue area and didn't find a solved issue that covers my problem.
  • This issue is about the toolkit itself, not Python, pip or other programming basics.
  • I understand if I do not check all the agreemnt items above, my issue MAY BE CLOSED OR REMOVED WITHOUT FURTHER EXPLANATIONS.

Problem

在自己新数据的训练 数据处理这块如何入手 有无具体的步骤指引

Environment

Environment Values
System Windows/Linux
GPU Device
CUDA Version
Python Version
PyTorch Version
dee (the Toolkit) Version
@xxllp xxllp added the question Further information is requested label Aug 5, 2022
@Spico197
Copy link
Owner

Spico197 commented Aug 5, 2022

您可在现有数据集的基础上单步调试一下,参考一下每个模块的功能。也可以参考这个issue #41 的讨论。

@xxllp
Copy link
Author

xxllp commented Aug 5, 2022

还有个问题:这个代码里面单个事件的某些role 是否可用支持多个metion。因为有些role 实体存在连续的这种

@Spico197
Copy link
Owner

Spico197 commented Aug 5, 2022

可以参考这个issue的讨论:#38 (comment)

@xxllp
Copy link
Author

xxllp commented Aug 5, 2022

very thx ,数据可用跑起来了 这块对单个文件直接预测 这块是已经具备了吗

@Spico197
Copy link
Owner

Spico197 commented Aug 5, 2022

inference.py 文件中提供了预测单个instance的例子。如果是预测一个文件的话,建议手写下 batch 化的预测,可以快一点。

@xxllp
Copy link
Author

xxllp commented Aug 6, 2022

看模型评估的时候有对比gold_span 和predict_span 结果 前者是ner的gt 是吧
我这边数据 predict 里面的 role F1 跟 gold_span 都差距10多个百分点

@xxllp
Copy link
Author

xxllp commented Aug 6, 2022

而且 我现在在test 数据集上面的指标都是0 而dev上面是正常的 这个是啥原因导致的 。dev test两个文件的格式目前是完全一样的

@Spico197
Copy link
Owner

Spico197 commented Aug 6, 2022

看模型评估的时候有对比gold_span 和predict_span 结果 前者是ner的gt 是吧 我这边数据 predict 里面的 role F1 跟 gold_span 都差距10多个百分点

什么是“ner的gt”?没太明白。。。您指的role F1是什么?

@Spico197
Copy link
Owner

Spico197 commented Aug 6, 2022

而且 我现在在test 数据集上面的指标都是0 而dev上面是正常的 这个是啥原因导致的 。dev test两个文件的格式目前是完全一样的

不清楚,需要再检查检查

@xxllp
Copy link
Author

xxllp commented Aug 6, 2022

看模型评估的时候有对比gold_span 和predict_span 结果 前者是ner的gt 是吧 我这边数据 predict 里面的 role F1 跟 gold_span 都差距10多个百分点

什么是“ner的gt”?没太明白。。。您指的role F1是什么?

这个输出目录中有 dee_eval.dev.gold_span.TriggerAwarePrunedCompleteGraph.json 这种 命名 这个gold_span 应该就是用的gold ner 是吧,role F1 就是 这个json 里面 overall-overall 里面的 MacroF1 ,就是所有role的F1 .

@xxllp
Copy link
Author

xxllp commented Aug 8, 2022

大佬 predict_one 返回的json 里面 comments 和event_list 是啥关系 为啥event_list 的论元 少于 在comments中的数量

@Spico197
Copy link
Owner

Spico197 commented Aug 8, 2022

看模型评估的时候有对比gold_span 和predict_span 结果 前者是ner的gt 是吧 我这边数据 predict 里面的 role F1 跟 gold_span 都差距10多个百分点

什么是“ner的gt”?没太明白。。。您指的role F1是什么?

这个输出目录中有 dee_eval.dev.gold_span.TriggerAwarePrunedCompleteGraph.json 这种 命名 这个gold_span 应该就是用的gold ner 是吧,role F1 就是 这个json 里面 overall-overall 里面的 MacroF1 ,就是所有role的F1 .

嗯啊是的,gold_span 是指预测结果时使用金标实体。后面您说的 role F1 我们称之为 overall F1 结果,因为首先要确保类别相同。NER 部分在篇章事件抽取任务中很重要,所以金标 NER 的 overall F1 会高很多。

@Spico197
Copy link
Owner

Spico197 commented Aug 8, 2022

大佬 predict_one 返回的json 里面 comments 和event_list 是啥关系 为啥event_list 的论元 少于 在comments中的数量

因为并不是每个实体都是参与事件的论元

@xxllp
Copy link
Author

xxllp commented Aug 8, 2022

但是我看了下 应该是缺少的居多 ,没参与的还是不多的 ,奇怪

@Spico197
Copy link
Owner

Spico197 commented Aug 8, 2022

但是我看了下 应该是缺少的居多 ,没参与的还是不多的 ,奇怪

确实很奇怪,可能是潜在的bug。您是在自己的数据集上训练的吗?repo中公开的模型里有没有发现这个问题?我看看能不能复现一下

@xxllp
Copy link
Author

xxllp commented Aug 8, 2022

是自己的数据集 公开的这块我没细看 因为我看ner span 的F1都有了0.90+ 但是 最终事件的role F1 却只有0.82 这个明显差了不少。可能就是过了那个连接图 一些实体间的连接都是0 才少了

@xxllp
Copy link
Author

xxllp commented Aug 15, 2022

有个新问题 PTPCG 模型 train 多卡训练是否 哪里需要改下 直接使用 scripts/train_multi.sh 带起来的话 只有一张卡实际在跑

@Spico197
Copy link
Owner

有个新问题 PTPCG 模型 train 多卡训练是否 哪里需要改下 直接使用 scripts/train_multi.sh 带起来的话 只有一张卡实际在跑

可以参考Doc2EDAG脚本的启动方法,加入--parallel_decorateflag。鉴于目前讨论事项与本issue无关,先将这个issue关闭了,其它问题欢迎新开issue。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants