Yale-LILY / ConvoSumm

Creative Commons Attribution Share Alike 4.0 International
37 stars 9 forks source link

Cannot use the summarization inference script #8

Open oncescuandreea opened 1 year ago

oncescuandreea commented 1 year ago

Hi,

By using the run.sh script in inference mode by loading one of the pretrained models from the README file, I keep getting this error:

Traceback (most recent call last):
  File "./scripts/summarization.py", line 432, in <module>
    main(args)
  File "./scripts/summarization.py", line 346, in main
    model = Summarizer.load_from_checkpoint(args.from_pretrained, args)
  File "/users/oncescu/miniconda3/envs/longformer/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 169, in load_from_checkpoint
    model = cls._load_model_state(checkpoint, *args, **kwargs)
  File "/users/oncescu/miniconda3/envs/longformer/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 208, in _load_model_state
    model = cls(*cls_args, **cls_kwargs)
TypeError: __init__() takes 2 positional arguments but 3 were given
Alex-Fabbri commented 1 year ago

Hi, Thanks for your interest in our work! That's probably from a difference in pytorch or other library version - can you try using the one from here?