Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use the summarization inference script #8

Open
oncescuandreea opened this issue Dec 27, 2022 · 1 comment
Open

Cannot use the summarization inference script #8

oncescuandreea opened this issue Dec 27, 2022 · 1 comment

Comments

@oncescuandreea
Copy link

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
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants