class_docstr: The G2P model evaluation wrapper
  
  Arguments
  ---------
  hparams: dict
      the dictionary from a parsed hyperparameter file
  device: str
      the device identifier
  model_state: dict
      a pre-loaded model state for a "warm start" if applicable
      - could be useful if hyperparameters have changed, but
      the same model can be reused from one run to the next
docstr: Evaluates a single epoch
  
  Arguments
  ---------
  dataset: DynamicItemDataset
      a G2P dataset (same as the ones used for training)
  
  Returns
  -------
  metrics: dict
      Raw PER metrics
docstr_tok: ["Evaluates","a","single","epoch","Arguments","--","--","--","--","-","dataset",":","DynamicItemDataset","a","G2P","dataset","(","same","as","the","ones","used","for","training",")","Returns","--","--","--","-","metrics",":","dict","Raw","PER","metrics"]
code: def evaluate_epoch(self, dataset, dataloader_opts=None):
      """
      Evaluates a single epoch
  
      Arguments
      ---------
      dataset: DynamicItemDataset
          a G2P dataset (same as the ones used for training)
  
      Returns
      -------
      metrics: dict
          Raw PER metrics
      """
      logger.info("Beginning evaluation")
      with torch.no_grad():
          self.per_metrics = self.hparams.per_stats()
          dataloader = sb.dataio.dataloader.make_dataloader(
              dataset,
              **dict(
                  dataloader_opts or {},
                  shuffle=True,
                  batch_size=self.hparams.eval_batch_size,
              ),
          )
          dataloader_it = iter(dataloader)
          if self.hparams.eval_batch_count is not None:
              dataloader_it = itertools.islice(
                  dataloader_it, 0, self.hparams.eval_batch_count
              )
              batch_count = self.hparams.eval_batch_count
          else:
              batch_count = math.ceil(
                  len(dataset) / self.hparams.eval_batch_size
              )
          for batch in tqdm(dataloader_it, total=batch_count):
              self.evaluate_batch(batch)
          if self.hparams.eval_output_wer_file:
              self._output_wer_file()
          return self.per_metrics.summarize()
  
imports: from hyperpyyaml import load_hyperpyyaml
  from speechbrain.dataio.batch import PaddedBatch
  from speechbrain.lobes.models.g2p.dataio import get_sequence_key
  from speechbrain.utils import hpopt
  from speechbrain.wordemb.util import expand_to_chars
  from train import dataio_prep, load_dependencies
  from types import SimpleNamespace
  from tqdm.auto import tqdm
  import math
  import itertools
  import speechbrain
  import torch
  import sys
  import logging
label_desc: Use image node_id 13 for calling the G2PEvaluator obj's underlying member method code with example usage: obj.evaluate_epoch(dataset, dataloader_opts) and returns: self