class_docstr: Test various Torch Generator agent behaviors.
class_docstr_tok: ["Test","various","Torch","Generator","agent","behaviors","."]
docstr: Ensures that --beam-size > 1 and --inference greedy causes a failure.
docstr_tok: ["Ensures","that","--","beam-size",">","1","and","--","inference","greedy","causes","a","failure","."]
code: def test_no_greedy_largebeam(self):
      """
      Ensures that --beam-size > 1 and --inference greedy causes a failure.
      """
      # we should have an exception if we mix beam size > 1 with inference greedy
      with self.assertRaises(ValueError):
          testing_utils.display_model(
              dict(
                  task="integration_tests:multiturn_nocandidate",
                  model_file="zoo:unittest/transformer_generator2/model",
                  beam_size=5,
                  inference="greedy",
              )
          )
  
      # and we shouldn't if we have inference beam
      testing_utils.display_model(
          dict(
              task="integration_tests:multiturn_nocandidate",
              model_file="zoo:unittest/transformer_generator2/model",
              beam_size=5,
              inference="beam",
          )
      )
  
imports: import unittest
  import math
  import torch
  from parlai.core.agents import create_agent
  from parlai.core.dict import DictionaryAgent
  import parlai.utils.testing
  from parlai.core.params import ParlaiParser
  from parlai.core.torch_generator_agent import BeamSearch, GreedySearch, NucleusSampling, FactualNucleusSampling, TopKSampling, TorchGeneratorAgent
  from parlai.agents.test_agents.transformer_generator_prefix import PREFIX_TEXT
label_desc: Use image node_id 2 for calling the TestTGA obj's underlying member method code with example usage: obj.test_no_greedy_largebeam() without return types