class_docstr: Test of T5 model.
class_docstr_tok: ["Test","of","T5","model","."]
docstr: FT T5 on overfit task.
docstr_tok: ["FT","T5","on","overfit","task","."]
code: def test_t5_ft(self):
      """
      FT T5 on overfit task.
      """
      with tempdir() as tmpdir:
          # test finetuning
          mf = os.path.join(tmpdir, "model")
          valid, test = testing_utils.train_model(
              dict(
                  task="integration_tests:overfit_multiturn",
                  model="hugging_face/t5",
                  learningrate=1.0,
                  batchsize=2,
                  num_epochs=50,
                  model_file=mf,
                  t5_model_parallel=False,
                  t5_model_arch="t5-small",
              )
          )
          self.assertLessEqual(valid["ppl"].value(), 1.5)
          self.assertLessEqual(test["ppl"].value(), 1.5)
  
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 9 for calling the TestT5Model obj's underlying member method code with example usage: obj.test_t5_ft() without return types