XingYing-stack / MILR

EMNLP 2022 paper: Boosting Document-Level Relation Extraction by Mining and Injecting Logical Rules
8 stars 1 forks source link

RuntimeError: stack expects a non-empty TensorList #3

Open KaiserLord opened 9 months ago

KaiserLord commented 9 months ago

请问你使用过别的数据集吗,除了docred和dwie之外的数据集,如semeval。我处理了semeval的数据集格式,但是总是在fact后,train的时候,报出错误。 Traceback (most recent call last): File "MILR-main/train.py", line 381, in main() File "MILR-main\model.py", line 35, in init self.srr = SRR(rule_path=rule_path, prior_path=prior_path, minC=minC, temperature=temperature, File "MILR-main\soft_rule_regularization.py", line 59, in init self.eliminate_anti_rule_for_ILP() File "MILR-main\soft_rule_regularization.py", line 247, in eliminate_anti_rule_for_ILP self.confidence_1_hop = torch.stack(confi_1_hop, dim=0) # stack expects a non-empty TensorList RuntimeError: stack expects a non-empty TensorList 也不知道是什么原因导致的,在fact构建的时候还是正常的

KaiserLord commented 9 months ago

后续更换过别的数据集,同样报出如上错误,请问如何解决或者请为我指点迷津,感谢!

SylvainVerdy commented 1 month ago

Hello,

I have the same error too.. Do you have any update? @KaiserLord @XingYing-stack

Best regards,

Thanks