class_docstr: Class for TabNet model.
class_docstr_tok: ["Class","for","TabNet","model","."]
docstr: Predict an epoch and update metrics.
  
  Parameters
  ----------
  name : str
      Name of the validation set
  loader : torch.utils.data.Dataloader
          DataLoader with validation set
docstr_tok: ["Predict","an","epoch","and","update","metrics",".","Parameters","--","--","--","--","--","name",":","str","Name","of","the","validation","set","loader",":","torch.utils.data.Dataloader","DataLoader","with","validation","set"]
code: def _predict_epoch(self, name, loader):
      """
      Predict an epoch and update metrics.
  
      Parameters
      ----------
      name : str
          Name of the validation set
      loader : torch.utils.data.Dataloader
              DataLoader with validation set
      """
      # Setting network on evaluation mode
      self.network.eval()
  
      list_y_true = []
      list_y_score = []
  
      # Main loop
      for batch_idx, (X, y) in enumerate(loader):
          scores = self._predict_batch(X)
          list_y_true.append(y)
          list_y_score.append(scores)
  
      y_true, scores = self.stack_batches(list_y_true, list_y_score)
  
      metrics_logs = self._metric_container_dict[name](y_true, scores)
      self.network.train()
      self.history.epoch_metrics.update(metrics_logs)
      return
  
imports: from dataclasses import dataclass, field
  from typing import List, Any, Dict
  import torch
  from torch.nn.utils import clip_grad_norm_
  import numpy
  from scipy.sparse import csc_matrix
  from abc import abstractmethod
  from pytorch_tabnet import tab_network
  from pytorch_tabnet.utils import SparsePredictDataset, PredictDataset, create_explain_matrix, validate_eval_set, create_dataloaders, define_device, ComplexEncoder, check_input, check_warm_start, create_group_matrix, check_embedding_parameters
  from pytorch_tabnet.callbacks import CallbackContainer, History, EarlyStopping, LRSchedulerCallback
  from pytorch_tabnet.metrics import MetricContainer, check_metrics
  from sklearn.base import BaseEstimator
  from torch.utils.data import DataLoader
  import io
  import json
  from pathlib import Path
  import shutil
  import zipfile
  import warnings
  import copy
  import scipy
label_desc: Use image node_id 12 for calling the TabModel obj's underlying member method code with example usage: obj._predict_epoch(name, loader) without return types