JohnSnowLabs / spark-nlp

State of the Art Natural Language Processing
https://sparknlp.org/
Apache License 2.0
3.76k stars 703 forks source link

bert for zero shot classification crashes on sentence basis #14276

Closed ahmedlone127 closed 1 month ago

ahmedlone127 commented 1 month ago

Description

This change modifies BertForZeroShotClassification by adding a method for padding with zeros all required arrays inside a batch to ensure all of them have the same length.

How Has This Been Tested?

ran local unit tests that were previously failing

Screenshots (if appropriate):

Types of changes

Checklist: