class_docstr: Test of DialoGPT model.
docstr: Ensures dialogpt provides the same generation results regardless of batchsize.
code: def test_batchsize(self):
      """
      Ensures dialogpt provides the same generation results regardless of batchsize.
      """
      # Test throwing the RuntimeError with add_special_tokens = False and batchsize > 1
      with self.assertRaises(RuntimeError):
          create_agent(
              {
                  "model": "hugging_face/dialogpt",
                  "add_special_tokens": False,
                  "batchsize": 2,
              }
          )
  
      for batchsize in [1, 2, 4]:
          for add_start_token in [True, False]:
              with self.subTest(
                  f"test_batchsize with bs={batchsize} and add_start_token={add_start_token}"
              ):
                  self._test_batchsize(batchsize, add_start_token)
  
file_path: ParlAI/tests/nightly/gpu/test_dialogpt.py
imports: import unittest
  import parlai.utils.testing
  from parlai.core.agents import create_agent
label_desc: Use image node_id 2 for calling the TestDialogptModel obj's underlying member method code with example usage: obj.test_batchsize() without return types