xingying-stack / milr Goto Github PK
View Code? Open in Web Editor NEWEMNLP 2022 paper: Boosting Document-Level Relation Extraction by Mining and Injecting Logical Rules
EMNLP 2022 paper: Boosting Document-Level Relation Extraction by Mining and Injecting Logical Rules
soft_rule_regularization.py中load_and_prune函数:
with open("*.pl", "rb") as file:
rule_miner = pickle.load(file)
一直会因为rule_dwie.txt的数据格式报错,UnpicklingError: invalid load key, '['.
请问你使用过别的数据集吗,除了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构建的时候还是正常的
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.