nju-websoft / KIRE

Enhancing Document-level Relation Extraction by Entity Knowledge Injection, ISWC 2022
GNU General Public License v3.0
13 stars 2 forks source link

tuple index out of range/KIER+altop/docred #5

Open wucui5 opened 11 months ago

wucui5 commented 11 months ago

Hello, I encountered this issue when trying to replicate your framework on the ALTOP model with the DocRED dataset. Any help would be greatly appreciated. Traceback (most recent call last): File "train.py", line 435, in main() File "train.py", line 425, in main dev_score, dev_output = evaluate(args, model, dev_features, tag="dev") File "train.py", line 214, in evaluate dids = batch[5] IndexError: tuple index out of range

njuxinyiwang commented 11 months ago

Hello,

  1. Regarding the ALTOP model you mentioned, do you mean the ATLOP model? Actually, we have provided our framework on the ATLOP model in the directory "ATLOP+KIRE".
  2. Regarding the IndexError, there may be something wrong with your dataloader. You can try to print the "batch" tuple to find the reason.
n-m-h commented 4 months ago

你好,我按照readme文件的步骤下载数据集,模型,然后运行脚本。 但是没有成功,这是什么问题啊?我并没有漏掉要下载的文件啊。

iShot_2024-04-22_21 02 10 iShot_2024-04-22_21 03 31
n-m-h commented 4 months ago

盼回复。。

njuxinyiwang commented 4 months ago

你好,需要你在ATLOP+KIRE文件夹下自行创建一个logs文件夹用于存储log文件。

n-m-h commented 4 months ago

不好意思啊,我刚学这个。如果要成功运行的话,我除了根据readme文件描述操作,还需要执行别的吗,比如执行train.py文件等。如果是要运行train.py的话,我报了个错误,维度匹配问题,排查了一天也没找到,您能指点一在吗?

iShot_2024-04-23_10 08 20
njuxinyiwang commented 4 months ago

按照readme执行,执行的sh文件里规定了train.py运行时的参数。