iLampard / lamp

PyTorch implementation of the paper "Language Models Can Improve Event Prediction by Few-Shot Abductive Reasoning", NeurIPS 2023
Apache License 2.0
49 stars 6 forks source link

There is no data in gdelt_chatgpt. 数据库gdelt_chatgpt中没有数据 #10

Closed luo-bing closed 3 weeks ago

luo-bing commented 1 month ago

I read an empty dictionary from the dictdatabase database named 'gdelt_chatgpt'. How can I resolve this issue?我从名为 'gdelt_chatgpt' 的 dictdatabase 数据库中读取到了一个空字典,我该如何解决这个问题?

luo-bing commented 1 month ago

Before running the second part of the code, I found that there was no database named "gdelt_chatgpt" in the project. After running the code, an empty database named "gdelt_chatgpt" was created. Then an error occurred: "argument of type 'NoneType' is not iterable." This is because init_db read the empty data from "gdelt_chatgpt" and attempted to iterate over it in the following code: if str(idx) in init_db and str(rel_or_obj) in init_db[str(idx)]. I'm wondering if this situation is normal, or how should I resolve it?