class_docstr: Test class for `CLIPScore` metric.
class_docstr_tok: ["Test","class","for","`","CLIPScore","`","metric","."]
docstr: Test that an error is raised if the number of images and text examples does not match.
docstr_tok: ["Test","that","an","error","is","raised","if","the","number","of","images","and","text","examples","does","not","match","."]
code: def test_error_on_not_same_amount_of_input(
      self, inputs, model_name_or_path
  ):
      """Test that an error is raised if the number of images and text examples does not match."""
      metric = CLIPScore(model_name_or_path=model_name_or_path)
      with pytest.raises(
          ValueError,
          match="Expected the number of images and text examples to be the same.*",
      ):
          metric(
              torch.randint(255, (2, 3, 64, 64)),
              "28-year-old chef found dead in San Francisco mall",
          )
  
imports: from functools import partial
  from typing import List, NamedTuple
  import matplotlib
  import matplotlib.pyplot
  import pytest
  import torch
  from torch import Tensor
  from torchmetrics.functional.multimodal.clip_score import clip_score
  from torchmetrics.multimodal.clip_score import CLIPScore
  from torchmetrics.utilities.imports import _TRANSFORMERS_GREATER_EQUAL_4_10
  from transformers import CLIPModel
  from transformers import CLIPProcessor
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
  from unittests.text.helpers import skip_on_connection_issues
label_desc: Use image node_id 4 for calling the TestCLIPScore obj's underlying member method code with example usage: obj.test_error_on_not_same_amount_of_input(inputs, model_name_or_path) without return types