class_docstr: A base runner for training without training tricks.
  Applying training tricks such as ensemble of template or verbalizer,
  or self-training can use other runner class.
  This class is specially implemented for classification.
  For generation task, though it can be integrated in this class
  via `task` option, we keep it as another class for simplicity.
  
  Args:
      model (:obj:`nn.Module`): One ``nn.Module`` object.
      train_dataloader (:obj:`PromptDataloader`, optional): The dataloader to bachify and process the training data.
      valid_dataloader (:obj:`PromptDataloader`, optionla): The dataloader to bachify and process the val data.
      test_dataloader (:obj:`PromptDataloader`, optional): The dataloader to bachify and process the test data.
      config (:obj:`CfgNode`): A configuration object.
      loss_function (:obj:`Callable`, optional): The loss function in the training process.
code: def inference_epoch(self, split: str):
      outputs = []
      self.model.eval()
      with torch.no_grad():
          data_loader = (
              self.valid_dataloader
              if split == "validation"
              else self.test_dataloader
          )
          for batch_idx, batch in enumerate(
              tqdm(data_loader, desc=split)
          ):
              batch = batch.to(
                  "cuda:{}".format(self.config.environment.local_rank)
              ).to_dict()
  
              outputs.append(self.inference_step(batch, batch_idx))
  
      metrics = self.inference_epoch_end(split, outputs)
      logger.info(f"{split} Performance: {metrics}")
      for metric_name, metric in metrics.items():
          self.log(f"{split}/{metric_name}", metric, self.cur_epoch)
      return metrics.popitem(last=False)[1]
  
imports: import os, shutil
  import sys
  import torch
  from torch import nn
  from torch.nn.parallel.data_parallel import DataParallel
  from openprompt.utils.cuda import model_to_device
  from tensorboardX import SummaryWriter
  from tqdm import tqdm
  import dill
  import warnings
  from typing import Callable, Union, Dict
  from openprompt.pipeline_base import PromptForClassification, PromptForGeneration
  from openprompt import PromptDataLoader
  from openprompt.prompts import *
  from openprompt.utils.logging import logger
  from openprompt.utils.metrics import classification_metrics, generation_metric
  from transformers import AdamW, get_linear_schedule_with_warmup
  from transformers.optimization import Adafactor, AdafactorSchedule
label_desc: Use image node_id 13 for calling the BaseRunner obj's underlying member method code with example usage: obj.inference_epoch(split) and returns: metrics