Git Product home page Git Product logo

ppat's Introduction

PPAT: Progressive Graph Pairwise Attention Network for Event Causality Identification

Setup

conda create -n PPAT python=3.8
conda activate PPAT
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
pip install -r requirements.txt

Download BERT-base from here and put it under encoder/BERT-base/ folder. Editing the vocab.txt as following (adding <t> and </t> as event marker tokens):

[PAD]
<t>
</t>
[unused2]
[unused3]
[unused4]
[unused5]
...

Data

We use EventStoryLine(v0.9) and Causal-TimeBank. The data is in the ''data'' folder. The MAVEN-ERE data set can be found in here

Running

running cross-validation on EventStoryLine

cd PPAT
python PPAT_framework.py --device {GPU device} --run_mode stack5

running one fold on EventStoryLine

cd PPAT
python PPAT_framework.py --device {GPU device} --run_mode train0

running one fold on Causal-TimeBank

cd PPAT
python PPAT_framework.py --device {GPU device} --run_mode train0 --stack_datapath "../data/ctb_stack10_123"  --dev_datapatg "../data/ctb_stack10_123/0/test.json"

ppat's People

Contributors

foggy-frost-forest avatar

Stargazers

YU Zhemeng avatar  avatar  avatar  avatar 吴宇涛 avatar  avatar Lean avatar  avatar  avatar Ryan Xu avatar

Watchers

Kostas Georgiou avatar  avatar  avatar

Forkers

catworkdog

ppat's Issues

utils

"Hi, I'm interested in learning from your open-source code and would like to request access to the 'utils' folder. My goal is to study and reproduce the code for educational purposes. Would you be willing to share it with me? Thanks in advance!""Hi, I'm interested in learning from your open-source code and would like to request access to the 'utils' folder. My goal is to study and reproduce the code for educational purposes. Would you be willing to share it with me? Thanks in advance!"

about experiment details

您好,非常感谢您的工作及开源的代码,想请问一下您的相关实验设置的一些细节:
1、数据集EventStoryLine中因果标签PRECONDITION和FALLING ACTION根据数据集相关论文描述是带有方向的,在MAVEN-ERE论文的代码中对ESL数据的处理也是将PRECONDITION和FALLING ACTION作为两个标签处理的且有方向,但是您的代码中将两个标签同视作一种因果标签并且不带方向,请问这是沿用了之前哪篇工作的实验设置(因为您之前大部分工作没有开源代码或者没有数据集处理的部分,非常感谢您能给出完整代码)。
2、请问您在论文中进行的MAVEN-ERE数据集的实验具体采用的怎样的实验设置,因为MAVEN-ERE中的CAUSE和PRECONDITION两种因果标签也是带有方向性的,请问您是与主实验类似都看作一种无方向的因果关系,还是与MAVEN-ERE代码中一样进行{CAUSE,PRECONDITION,NONE}的三分类模式?
如您方便的话可以通过github issue或者邮箱[email protected]回复,再次感谢您的工作!

utils

您好,打扰一下您,请问您是不是少长传了utils文件夹

RRGCATbert_dataset

您好,我在运行中发现
assert len(self.PAD) == len(self.CLS) == len(self.TSTART) == len(self.TEND) == 1 assert pad_len >= 0 and len(token_pie) == len(pos_pie)
这四个变量的长度并不都等于1。
pad_len小于0并且token_pie和pos_pie的长度不相等。
请问您如何解决的?

代码

方便共享一下代码吗

OOM at the second epoch

I use the A6000 GPU as the device to train the model in the ESL dataset, which memory is 48GB. I succeed finished the first epoch with more than 47GB memory, but Out Of Memory at the second epoch. Any advice on how to debug this issue will be greatly appreciated as I am not sure myself where to even begin.

代码

老师您好,您的代码中好像缺少esl_dev.json文件方便共享一下,让学生复现一下吗,感激不尽

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.