class_docstr: Test of DialoGPT model.
docstr: Test generation consistency for off-the-shelf dialogpt models.
code: def test_nospecialtok(self):
      """
      Test generation consistency for off-the-shelf dialogpt models.
      """
      test_cases = [
          (
              "What a nice weather!",
              "I'm in the UK and it's raining here.",
          ),
          ("Nice to meet you!", "Hello! I'm from the future!"),
      ]
      opt = {
          "model": "hugging_face/dialogpt",
          "gpt2_size": "small",
          "text_truncate": 100,
          "label_truncate": 20,
          "beam_min_length": 1,
          "inference": "beam",
          "beam_size": 1,
          "add_special_tokens": False,
          "batchsize": 1,
      }
      dialogpt = create_agent(opt)
      for text, label in test_cases:
          dialogpt.observe({"text": text, "episode_done": True})
          response = dialogpt.act()
          assert response["text"] == label
  
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 4 for calling the TestDialogptModel obj's underlying member method code with example usage: obj.test_nospecialtok() without return types