loveisp / KDD_2024_AQA

KDD 2024 AQA competition 3rd place solution
3 stars 1 forks source link

复现代码 #2

Open zfjsail opened 3 months ago

zfjsail commented 3 months ago

你好,

我是kdd比赛组织者。predict时运行 merge_embeddings.py 报错,请问该怎么解决?

python merge_embeddings.py sfr (466387, 4096) (466387, 4096) 395812 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Traceback (most recent call last): File "/data1/zhangfanjin/ssj/shijie/3th/KDD_2024_AQA/predict/merge_embeddings.py", line 33, in embeds[paper_idx_old] = embeds_old ValueError: shape mismatch: value array of shape (466387,4096) could not be broadcast to indexing result of shape (395812,4096)

loveisp commented 3 months ago

抱歉,我发现我有几个文件里的路径写错了。

请把 infer_with_pretrained/infer_sfr.py 和 infer_with_pretrained/infer_gritlm.py 以及 finetune/infer_sfrm.py 里的 json_path = '../AQA/AQA-test-public/pid_to_title_abs_update_filter.json' 改为 json_path = '../AQA/pid_to_title_abs_new.json',并重新执行这三个文件,然后再做这里的 merge_embeddings 。实在抱歉。

loveisp commented 3 months ago

代码里确实可能会有一些错误,因为有些代码是从ipynb里整理出来的,py代码由于时间比较紧,也没来得及逐一测试,您那边发现什么问题,比如报错或者结果不一致的情况,随时联系我哈。