class_docstr: Checks that Hred can learn some very basic tasks.
docstr: Ensures beam search can generate the correct response.
docstr_tok: ["Ensures","beam","search","can","generate","the","correct","response","."]
code: def test_beamsearch(self):
      """
      Ensures beam search can generate the correct response.
      """
      valid, test = testing_utils.eval_model(
          dict(
              task="integration_tests:multiturn_candidate",
              model="hred",
              model_file="zoo:unittest/hred_model/model",
              dict_file="zoo:unittest/hred_model/model.dict",
              skip_generation=False,
              numlayers=1,
              batchsize=8,
              inference="beam",
              beam_size=5,
              num_examples=20,
          )
      )
      self.assertGreater(valid["accuracy"], 0.95)
      self.assertGreater(test["accuracy"], 0.95)
  
imports: import unittest
  import parlai.utils.testing
label_desc: Use image node_id 3 for calling the TestHred obj's underlying member method code with example usage: obj.test_beamsearch() without return types