class_docstr: Test of T5 model.
class_docstr_tok: ["Test","of","T5","model","."]
docstr: Test out-of-the-box T5 generation.
docstr_tok: ["Test","out-of-the-box","T5","generation","."]
code: def test_t5_gen(self):
      """
      Test out-of-the-box T5 generation.
      """
      opt = ParlaiParser(True, True).parse_args(
          ["--model", "hugging_face/t5"]
      )
      t5 = create_agent(opt)
      text = "Don't have a cow, Man!"
      obs = {"text": text, "episode_done": True}
      t5.observe(obs)
      act = t5.act()
  
      self.assertEqual(act["text"], text)
  
imports: import os
  import torch
  import unittest
  from parlai.core.agents import create_agent
  from parlai.core.params import ParlaiParser
  from parlai.core.torch_agent import Batch
  import parlai.utils.testing
  from parlai.utils.torch import padded_tensor
  from parlai.utils.testing import tempdir
  from tests.test_distributed import _AbstractTest
label_desc: Use image node_id 8 for calling the TestT5Model obj's underlying member method code with example usage: obj.test_t5_gen() without return types