zychen423 / KE-VIST

The code and output of our AAAI paper "Knowledge-Enriched Visual Storytelling"
GNU General Public License v3.0
40 stars 9 forks source link

Data Format in vist_scored_terms_6_path.json generated from stage 2 #6

Closed FeatherZhong closed 3 years ago

FeatherZhong commented 3 years ago

Hi, I am tring to generation story in stage 3 using the command you provide below: python inference_added_story.py -model save_model_finetuneLDPE_pretrain_vist/trained_accu_56.156.chkpt -term_path ../../stage2/vist_scored_terms_6_path.json -device 1 -positional LDPE -insert 0 -relation 0 but I get some errors and found that they came from the wrong format of the file vist_scored_terms_6_path.json generated from stage2. In the ROCAddTermsetDataset which using by the data loader the dialogs loaded from vist_scored_terms_6_path.json is a dictionary, not a list, so it cannot be indexed at here, and I can't see the predicted_term_seq field in the file mentioned here . I would appreciate it if you could help me to solve this problem.

ethan5437 commented 3 years ago

Hi, I've added a new code in stage2: convert_file_format.py

Please run the file to convert the file format. ("vist_scored_terms_6_path.json" to "vist_scored_terms_6_path_for_stage3.json". )

Thus, the term_path will be modified to vist_scored_terms_6_path_for_stage3.json. e.g.) python inference_added_story.py -model save_model_finetuneLDPE_pretrain_vist/trained_accu_55.397.chkpt -device 3 -positional LDPE -term_path ../../stage2/vist_scored_terms_6_path_for_stage3.json

ethan5437 commented 3 years ago

also, I've updated the code to download the saved checkpoint for the model in stage2/data/download_big_data.sh.

Or you could get it by typing: wget https://doraemon.iis.sinica.edu.tw/KE_VIST_AAAI2020/trained_accu_55.397.chkpt

FeatherZhong commented 3 years ago

Thank you very much for your help.This code worked!

ethan5437 commented 3 years ago

No problem! Glad to help!!!

jingziyou commented 1 year ago

Thank you very much for your help.This code worked!

Hi,FeatherZhong Now,I'm replicating this code,but i encounter many difficuties.The biggest difficulty is that the download links invalid.Saw you haved run this code successful.I wonder if it is convenient to provide me with a complete code.Thanks a lot!