How can i supress this warning

Your max_length is set to 142, but your input_length is only 88. Since this is a summarization task, where outputs shorter than the input are typically wanted, you might consider decreasing max_length manually, e.g. summarizer(‘…’, max_length=44)

this warning comes in my output terminal for every time the summarizer pipeline is used
the model that i have used is
pipeline(“summarization”, model = “facebook/bart-large-cnn”)
how to tackle this issue so that i get cleaner more concise output

That’s tough because it’s explicitly stated in the config.

import warnings
warnings.simplefilter('ignore') # In any case, try to avoid warnings as much as possible.
warnings.simplefilter('ignore', SyntaxWarning) # Use this instead if you can limit the type of warning.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.