How to change the batch size in a pipeline?
Hello!Sorry for the simple question but I was wondering how can I change thebatch sizewhen I load apipelinefor sentiment classification.I useclassifier = pipeline('sentiment-analysis')but the list of sentences I feed the classifier is too big to be processed in one batch.Thanks!
2021-12-13T12:27:40Z
You can do it in the method call:examples = ["I hate everyone" ] * 100
classifier(examples, batch_size=10)