class_docstr: Tabular Model Tuner.
  
  This class is used to tune the hyperparameters of a TabularModel, given the search space,  strategy and metric to
  optimize.
class_docstr_tok: ["Tabular","Model","Tuner",".","This","class","is","used","to","tune","the","hyperparameters","of","a","TabularModel",",","given","the","search","space",",","strategy","and","metric","to","optimize","."]
docstr: Update the configs with the new parameters.
docstr_tok: ["Update","the","configs","with","the","new","parameters","."]
code: def _update_configs(
      self,
      trainer_config: TrainerConfig,
      optimizer_config: OptimizerConfig,
      model_config: ModelConfig,
      params: Dict,
  ):
      """Update the configs with the new parameters."""
      # update configs with the new parameters
      for k, v in params.items():
          root, param = k.split("__")
          if root.startswith("trainer_config"):
              self._check_assign_config(trainer_config, param, v)
          elif root.startswith("optimizer_config"):
              self._check_assign_config(optimizer_config, param, v)
          elif root.startswith("model_config.head_config"):
              param = param.replace("model_config.head_config.", "")
              self._check_assign_config(
                  model_config.head_config, param, v
              )
          elif (
              root.startswith("model_config")
              and "head_config" not in root
          ):
              self._check_assign_config(model_config, param, v)
          else:
              raise ValueError(
                  f"{k} is not in the proper format. Use __ to separate the "
                  "root and param. for eg. `training_config__batch_size` should be "
                  "used to update the batch_size parameter in the training_config"
              )
      return trainer_config, optimizer_config, model_config
  
file_path: pytorch_tabular/src/pytorch_tabular/tabular_model_tuner.py
imports: import warnings
  from collections import namedtuple
  from copy import deepcopy
  from pathlib import Path
  from typing import Callable, Dict, Iterable, Optional, Union
  import numpy
  import pandas
  from omegaconf.dictconfig import DictConfig
  from pandas import DataFrame
  from rich.progress import track
  from sklearn.model_selection import BaseCrossValidator, ParameterGrid, ParameterSampler
  from pytorch_tabular.config import DataConfig, ModelConfig, OptimizerConfig, TrainerConfig
  from pytorch_tabular.tabular_model import TabularModel
  from pytorch_tabular.utils import OOMException, OutOfMemoryHandler, get_logger, suppress_lightning_logs
label_desc: Use image node_id 3 for calling the TabularModelTuner obj's underlying member method code with example usage: obj._update_configs(trainer_config, optimizer_config, model_config, params) and returns: trainer_config,  optimizer_config,  model_config