class_docstr: Test classifier on generator.
class_docstr_tok: ["Test","classifier","on","generator","."]
docstr: Test the accuracy of the classifier trained on previous and current utterances.
  
  This should be very close to 100%, because this classifier was used to label the
  styles of this dataset to begin with.
docstr_tok: ["Test","the","accuracy","of","the","classifier","trained","on","previous","and","current","utterances",".","This","should","be","very","close","to","100","%",",","because","this","classifier","was","used","to","label","the","styles","of","this","dataset","to","begin","with","."]
code: def test_prev_curr_accuracy(self):
      """
      Test the accuracy of the classifier trained on previous and current utterances.
  
      This should be very close to 100%, because this classifier was used to label the
      styles of this dataset to begin with.
      """
      _, test = testing_utils.eval_model(
          opt={
              "batchsize": 4,
              "fp16": True,
              "num_examples": 16,
              "model_file": "zoo:style_gen/prev_curr_classifier/model",
              "model": "projects.style_gen.classifier:ClassifierAgent",
              "classes_from_file": "image_chat_personalities_file",
              "task": "style_gen:PrevCurrUttStyle",
              "wrapper_task": "style_gen:LabeledBlendedSkillTalk",
          },
          skip_valid=True,
      )
      self.assertAlmostEqual(test["accuracy"], 1.0, delta=0.0)
  
file_path: ParlAI/tests/nightly/gpu/test_style_gen.py
imports: import unittest
  import parlai.utils.testing
  from parlai.core.opt import Opt
label_desc: Use image node_id 2 for calling the TestClassifierOnGenerator obj's underlying member method code with example usage: obj.test_prev_curr_accuracy() without return types