test_pipelines_sentiment_analysis.py 518 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
import unittest

from .test_pipelines_common import MonoInputPipelineCommonMixin


class SentimentAnalysisPipelineTests(MonoInputPipelineCommonMixin, unittest.TestCase):
    pipeline_task = "sentiment-analysis"
    small_models = [
        "sshleifer/tiny-distilbert-base-uncased-finetuned-sst-2-english"
    ]  # Default model - Models tested without the @slow decorator
    large_models = [None]  # Models tested with the @slow decorator
    mandatory_keys = {"label", "score"}  # Keys which should be in the output