class_docstr: Basic tests on the eval_model.py example.
class_docstr_tok: ["Basic","tests","on","the","eval_model.py","example","."]
docstr: Test that evaluating a model with train:evalmode completes an epoch.
docstr_tok: ["Test","that","evaluating","a","model","with","train",":","evalmode","completes","an","epoch","."]
code: def test_train_evalmode(self):
      """
      Test that evaluating a model with train:evalmode completes an epoch.
      """
      base_dict = {
          "model": "repeat_label",
          "datatype": "train:evalmode",
      }
  
      teachers = [
          "integration_tests:fixed_dialog_candidate",
          "integration_tests",
      ]
      batchsize = [1, 64]
      for bs in batchsize:
          for teacher in teachers:
              d = base_dict.copy()
              d["task"] = teacher
              d["batchsize"] = bs
              with testing_utils.timeout(time=20):
                  valid, test = testing_utils.eval_model(
                      d, valid_datatype=d["datatype"]
                  )
              self.assertEqual(
                  int(valid["exs"]),
                  500,
                  f"train:evalmode failed with bs {bs} and teacher {teacher}",
              )
  
file_path: ParlAI/tests/test_eval_model.py
imports: import os
  from parlai.utils.io import PathManager
  import pytest
  import unittest
  import parlai.utils.testing
  from parlai.scripts.eval_model import get_task_world_logs
label_desc: Use image node_id 8 for calling the TestEvalModel obj's underlying member method code with example usage: obj.test_train_evalmode() without return types