VT-NLP / Mocheg

Dataset and Code for Multimodal Fact Checking and Explanation Generation (Mocheg)
Apache License 2.0
36 stars 8 forks source link

Issue with Model Loading during the explanation generation task #5

Closed z27833009 closed 1 year ago

z27833009 commented 1 year ago

I have encountered a problem during the explanation generation task

python controllable_generation.py   --do_predict --per_device_train_batch_size 8 --per_device_eval_batch_size 8  --predict_with_generate --text_column truth_claim_evidence --summary_column cleaned_ruling_outline  --model_name_or_path checkpoint/controllable_generation/generation/without  --test_file data/test/Corpus2_for_controllable_generation.csv  --output_dir controllable/generation/output/bart/run_0/without

where the model loading path seems to be missing, resulting in the following error:

**FileNotFoundError: [Errno 2] No such file or directory: '/home/menglong/workspace/code/misinformation_detection/controllable/classification/output/runs/00006-/base.pt'**

I wanted to seek your guidance on whether I should utilize the model located at '/Mocheg/checkpoint/claim_verification/text_and_image_evidence/base.pt' as an alternative to resolve this issue. Your insight on this matter would be greatly appreciated.

Barry-Menglong-Yao commented 1 year ago

My original document missed the argument for the classifier in the controllable generation. Fixed it. You can try the following script:

CUDA_VISIBLE_DEVICES=0 python controllable_generation.py --do_predict --per_device_train_batch_size 8 --per_device_eval_batch_size 8 --predict_with_generate --text_column truth_claim_evidence --summary_column cleaned_ruling_outline --model_name_or_path checkpoint/controllable_generation/generation/without --test_file data/test/Corpus2_for_controllable_generation.csv --train_file data/train/Corpus2_for_controllable_generation.csv --validation_file data/val/Corpus2_for_controllable_generation.csv --output_dir controllable/generation/output/bart/run_0/without --classifier_checkpoint_dir=#Path_to_the_generation_classfier

If you have downloaded my checkpoints, the generation_classfier is within the folder checkpoint/controllable_generation/explanation_classify.