class_docstr: Class for TabNet model.
class_docstr_tok: ["Class","for","TabNet","model","."]
docstr: Setup the callbacks functions.
  
  Parameters
  ----------
  custom_callbacks : list of func
      List of callback functions.
docstr_tok: ["Setup","the","callbacks","functions",".","Parameters","--","--","--","--","--","custom_callbacks",":","list","of","func","List","of","callback","functions","."]
code: def _set_callbacks(self, custom_callbacks):
      """Setup the callbacks functions.
  
      Parameters
      ----------
      custom_callbacks : list of func
          List of callback functions.
  
      """
      # Setup default callbacks history, early stopping and scheduler
      callbacks = []
      self.history = History(self, verbose=self.verbose)
      callbacks.append(self.history)
      if (self.early_stopping_metric is not None) and (
          self.patience > 0
      ):
          early_stopping = EarlyStopping(
              early_stopping_metric=self.early_stopping_metric,
              is_maximize=(
                  self._metrics[-1]._maximize
                  if len(self._metrics) > 0
                  else None
              ),
              patience=self.patience,
          )
          callbacks.append(early_stopping)
      else:
          wrn_msg = "No early stopping will be performed, last training weights will be used."
          warnings.warn(wrn_msg)
  
      if self.scheduler_fn is not None:
          # Add LR Scheduler call_back
          is_batch_level = self.scheduler_params.pop(
              "is_batch_level", False
          )
          scheduler = LRSchedulerCallback(
              scheduler_fn=self.scheduler_fn,
              scheduler_params=self.scheduler_params,
              optimizer=self._optimizer,
              early_stopping_metric=self.early_stopping_metric,
              is_batch_level=is_batch_level,
          )
          callbacks.append(scheduler)
  
      if custom_callbacks:
          callbacks.extend(custom_callbacks)
      self._callback_container = CallbackContainer(callbacks)
      self._callback_container.set_trainer(self)
  
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 16 for calling the TabModel obj's underlying member method code with example usage: obj._set_callbacks(custom_callbacks) without return types