Giter Site home page Giter Site logo

Comments (10)

qibinc avatar qibinc commented on August 28, 2024 1

Hi @zycdev ,

Here is an example for running the new version:

For task 1, run:

CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py --batch-size 16 --expname test --weight-decay 0.01

For task 2, run:

CUDA_VISIBLE_DEVICES=0 python train.py --load --load-path saved/bert-base-uncased-test.bin --mode '#2' --lr1 2e-5 --gradient-accumulation-steps 8 --expname test --tune

(that's right, now we only need one GPU for task 2)

For inference, run:

CUDA_VISIBLE_DEVICES=0 python infer.py --data-file data/hotpot_dev_fullwiki_v1_merge.json --model-file saved/bert-base-uncased-test.bin

Evaluation:

python scripts/hotpot_evaluate_v1.py data/hotpot_dev_fullwiki_v1_merge_pred.json data/hotpot_dev_fullwiki_v1_merge.json

from cogqa.

Sleepychord avatar Sleepychord commented on August 28, 2024

Hi, thank you for pointing out it. I have conducted some minor modification in the pre-processing scripts after generating the examples, but I do not think it is a main reason (maybe I am wrong). In my experiments, learning_rate, batch_size and early stop strategies(if you add) and some other parameters can affect the results up to 10%. Maybe you can try to delete the linear_warm_up in task #2(I realize that after finishing the paper)?

from cogqa.

zycdev avatar zycdev commented on August 28, 2024

Hi, @Sleepychord , very thank you for your reply! I retrained BERT for 1 epoch and then BERT & GNN for 1 epoch with hyperparameters as you showed in the paper, but I still can't reproduce the result of the paper on dev set.

My training commands:

export CUDA_VISIBLE_DEVICES=0,1,2,3  # 4 K80(12GB memory) GPUs
python train.py --batch-size=10 --lr1=1e-4
python train.py --load=True --mode='bundle' --batch-size=10 --lr1=4e-5 --lr2=1e-4  # haven't delete the linear_warm_up yet

and my evaluation result on dev set:

{'em': 0.2598244429439568, 'f1': 0.35564370767865855, 'prec': 0.37582762612134724, 'recall': 0.35888658012669966, 'sp_em': 0.07562457798784605, 'sp_f1': 0.3665706092242228, 'sp_prec': 0.4997955049676863, 'sp_recall': 0.3207705540014783, 'joint_em': 0.03349088453747468, 'joint_f1': 0.19135653981707093, 'joint_prec': 0.2720478977096129, 'joint_recall': 0.17037639264369026}

Could you provide more details about hyperparameters, training strategies of your best experimental result? I am looking forward to your advice.

Thanks!

from cogqa.

qibinc avatar qibinc commented on August 28, 2024

Hi @zycdev ,

I'm not sure what's the problem you encountered but I've successfully got reasonable results with the scripts you provided.
I also made an improved version of CogQA here, which is be much faster and far less resource-demanding for task 2, with slightly better results. You can try that out.

Hope this helps!

from cogqa.

Sleepychord avatar Sleepychord commented on August 28, 2024

@zycdev , I think that tuning the learning_rate in task #2 is effective. Thank @qibinc for improvement and maybe you can follow it.

from cogqa.

zycdev avatar zycdev commented on August 28, 2024

@qibinc @Sleepychord Thank you very much for your work, I am glad to try the new version!

from cogqa.

zycdev avatar zycdev commented on August 28, 2024

Hi @qibinc , I am grateful for the guideline, just wanting to ask for this :-D

from cogqa.

ditingdapeng avatar ditingdapeng commented on August 28, 2024
CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py --batch-size 16 --expname test --weight-decay 0.01

老哥你好,我看你的代码中数据用的是"hotpot_train_v1.1_refined.json",这个refined是因为对数据做了什么改变吗?

from cogqa.

Sleepychord avatar Sleepychord commented on August 28, 2024

@ditingdapeng refined是预处理过的,每个QA pair增加了两个域表示模糊匹配等算法抽取出来的真实cognitive graph的节点,对数据本身没有别的改动。

from cogqa.

ditingdapeng avatar ditingdapeng commented on August 28, 2024

from cogqa.

Related Issues (20)

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.