Giter Site home page Giter Site logo

casee's People

Contributors

jiaweisheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

casee's Issues

SourceCode

Hello, I read your paper and you said your source code is here, but I don't see any code. Could you give the source code?

running error

你好!我的环境是torch1.1,transformers4.9.1会出现以下错误,请问这是什么问题啊?
[1] Traceback (most recent call last):
[2] File "/project/event/CasEE/main.py", line 10, in
[3] from transformers import *
[4] File "/usr/local/lib/python3.6/dist-packages/transformers/pipelines/init.py", line 30, in
[5] from .automatic_speech_recognition import AutomaticSpeechRecognitionPipeline
[6] File "/usr/local/lib/python3.6/dist-packages/transformers/pipelines/automatic_speech_recognition.py", line 20, in
[7] from .base import Pipeline
[8] File "/usr/local/lib/python3.6/dist-packages/transformers/pipelines/base.py", line 43, in
[9] from ..models.auto.modeling_auto import AutoModel
[10] File "/usr/local/lib/python3.6/dist-packages/transformers/models/auto/modeling_auto.py", line 116, in
[11] from ..detr.modeling_detr import DetrForObjectDetection, DetrModel
[12] File "/usr/local/lib/python3.6/dist-packages/transformers/models/detr/modeling_detr.py", line 1315, in
[13] class DetrForObjectDetection(DetrPreTrainedModel):
[14] File "/usr/local/lib/python3.6/dist-packages/transformers/models/detr/modeling_detr.py", line 1333, in DetrForObjectDetection
[15] @torch.jit.unused
[16] AttributeError: module 'torch.jit' has no attribute 'unused'

您好,token位置的问题想请教您。

请问,text2token_id的时候,如果经过tokenize的话,trigger个args的span是不是可能会发生变化?比如遇到数字和字母的情况,是不是应该考虑一下token和原始text的span差异的问题。

Can not run

Hi, thank you to share your code!
Here are some problems in your code, when i ran the main.py, it meet an error like this below :
"CasEE/utils/framework.py", line 71, in train
token = torch.LongTensor(token).to(self.config.device)
ValueError: expected sequence of length 79 at dim 1 (got 83)
"
I find that in your code there's no padding to the tokens to the same length, maybe it's why it goes like this.

A little question

Thank you for sharing your work. In the experimental part, I found that you have conducted experimental comparison for overlapping events during the learning process. How did you build the overlapping sentence test dataset? If you can, would it be convenient to share it. I think I'd appreciate it if you could share it. My qq email [email protected]!!

标签移位问题

你好,作者代码写的清楚明白,学习了。但是有个问题,在做args_s和args_e数据的时候,作者有没有考虑到bert tokenize移位问题呢?举个例子,句子“截至目前,好当家集团共持有好当家股份6.02亿股,占总股本的41.24%;累计质押好当家股份3.4亿股”,3.4亿span是[46,50],但是bert tokenize后是['[CLS]', '截', '至', '目', '前', ',', '好', '当', '家', '集', '团', '共', '持', '有', '好', '当', '家', '股', '份', '6', '.', '02', '亿', '股', ',', '占', '总', '股', '本', '的', '41', '.', '24', '%', ';', '累', '计', '质', '押', '好', '当', '家', '股', '份', '3', '.', '4', '亿', '股', '[SEP]']这个时候3.4亿的span就不是[46,50]了

Questions about your paper

Hello!
This is a good job.Your paper gives me great inspiration.I have read your paper recently. I have some details to ask.
1.Where does your reproduced PLMEE code come from? Is it implemented by yourself? Can you recommend a link to the source code.
2. Where does your reproduced MQAEE code come from? Did you implement it yourself?
I look forward to your reply.

source code

Hi, how long will it take to upload the code?

Thank you for your apply. I did run the code as in readme. Because there's already cascading data in your repo, I just run "CUDA_VISIBLE_DEVICES=0 nohup python -u main.py --output_model_path ./models_save/model.bin --do_train True --do_eval True --do_test True > logs/model.log &", then meet the problem I describled above.

Hi, ​I didn't reproduce this problem.
Actually, the padding operation is in CasEE/utils/data_loader.py line 207.
Maybe it is caused by other reason. Please run the code as in readme.

Originally posted by @JiaweiSheng in #3 (comment)

data_loader.py

作者您好,最近在阅读您的代码,发现trigger_seq_id和args_seq_id并未考虑[CLS]和[SEP],这样不会造成输入和标签不匹配的问题吗?

效果差的太多太多了

训练出来的结果在测试集上:
TI: P:49.8, R:32.7, F:39.5
TC: P:37.9, R:30.0, F:33.4
AI: P:39.7, R:30.2, F:34.3
AC: P:38.6, R:29.3, F:33.3
差了三十多的点了

About the result in your paper

Hi, I did the experiments directly using your code(only commented 155/156/205/206 line in model.py and 209 line in data_loader.py, for the version of transformer is different with your's), and the result is different with the papers. I want to know if there anything I did wrong.

1. my experiment result:

TI: P:88.1, R:88.7, F:88.4
TC: P:74.0, R:81.7, F:77.7
AI: P:68.8, R:75.9, F:72.2
AC: P:66.9, R:73.9, F:70.2

2. the change:

2.1 for model.py

outputs = self.bert(
tokens,
attention_mask=mask,
token_type_ids=segment,
position_ids=None,
head_mask=None,
inputs_embeds=None,
# output_attentions=None,
# output_hidden_states=None,
)

2.2 for data_loader.py

change
inputs = self.tokenizer.encode_plus(data_content, add_special_tokens=True, max_length=self.seq_len, truncation=True, padding='max_length')
to

inputs = self.tokenizer.encode_plus(data_content, add_special_tokens=True, max_length=self.seq_len, pad_to_max_length=True)

Run with Multiple GPUs

Hi, thanks for your code, it's an excellent work!
I tried to run your code with multiple gpus using the following command:

CUDA_VISIBLE_DEVICES=5,4 python main.py --output_model_path ./models_save/model.bin --do_train True --do_eval True --do_test True > logs/model.log

But it turned out that only gpu 5 is used 😢 I don't konw whether you can run with multiple gpus, maybe this is a problem only caused by myself.

I guess it is because the following code:

model = torch.nn.DataParallel(model)

should be:

self.model = torch.nn.DataParallel(model) 

and also, to further realize running with multiple gpus, I also modified the following code:

self.type_indices = torch.arange(0, config.type_num, 1).long().to(config.device)

to:

self.register_buffer('type_indices', torch.arange(0, config.type_num, 1).long())

After the above two modifications, it works fine with multiple gpus.

Some details

Hi, I read your code which is an excellent work. And here I listed some details and my questions about your work to avoid wrong understanding:

(1) The indicator function I(r,c) in your paper is to indicate whether the role r belongs to the type c . But in your code, you actually used the predefined event schema (i.e., ty_args_id which contains the infomation given by ty_args.json) . According to this, the indicator function not really decided whether the role r belongs to the type c, but just act as a computed weight coefficient to adjust the score computed by the sigmoid func.

(2) Except for the event schema, in prediction, you also use the other prior information, such as largest length of trigger/argument. Did all the three prior information are only calculated from training data?

(3)In the evaluation metric, I find that the evaluation metric of argument identification and argument classification missing trigger information, so it's not a very strict metric. And if adding these(I mean an argument is correctly identified if ifs offset, related trigger type and trigger's offsets exactly match a reference argument), the performance will decrease.

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.