allenai / scitldr

https://scitldr.apps.allenai.org/
Apache License 2.0
744 stars 84 forks source link

Error while using generate.py #9

Open smita181298 opened 3 years ago

smita181298 commented 3 years ago

Hello, @armancohan @kyleclo @isabelcachola I am trying to generate a summary from this command given in the repo. !python generate.py model/ data_input/ out/ --checkpoint_file checkpoint_best.pt --beam 2 --lenpen 0.4 --test_fname test.hypo Here model is the folder containing checkpoint given for summarization( bart.tldr-aic) data_input contains test.source file which is a text file containing the source content of the test.jsonl file of scitldr/SciTLDR-Data/SciTLDR-AIC/ out is an empty folder to store the output.

I am getting this error.

Traceback (most recent call last): File "generate.py", line 100, in generate_TLDRs(vars(args)) File "generate.py", line 17, in generate_TLDRs task='translation' File "/content/gdrive/My Drive/Internship_SPI_Smita/Scientific_paper_summarization/scitldr/fairseq/fairseq/models/bart/model.py", line 112, in from_pretrained kwargs, File "/content/gdrive/My Drive/Internship_SPI_Smita/Scientific_paper_summarization/scitldr/fairseq/fairseq/hub_utils.py", line 73, in from_pretrained arg_overrides=kwargs, File "/content/gdrive/My Drive/Internship_SPI_Smita/Scientific_paper_summarization/scitldr/fairseq/fairseq/checkpoint_utils.py", line 243, in load_model_ensemble_and_task task = tasks.setup_task(args) File "/content/gdrive/My Drive/Internship_SPI_Smita/Scientific_paper_summarization/scitldr/fairseq/fairseq/tasks/init.py", line 27, in setup_task return TASK_REGISTRY[task_cfg.task].setup_task(task_cfg, **kwargs) File "/content/gdrive/My Drive/Internship_SPI_Smita/Scientific_paper_summarization/scitldr/fairseq/fairseq/tasks/translation.py", line 226, in setup_task paths = utils.split_paths(args.data) File "/content/gdrive/My Drive/Internship_SPI_Smita/Scientific_paper_summarization/scitldr/fairseq/fairseq/utils.py", line 59, in split_paths if "://" not in paths TypeError: argument of type 'NoneType' is not iterable

Please help me on how to solve this.

anshoomehra commented 3 years ago

@smita181298 you are a step ahead, I am having a hard time generating data files, getting the below error for "AIC":