docstr: Calculates and updates a few key information to the config object.
  
  Args:
      config (DictConfig): The config object
  
  Returns:
      InferredConfig: The updated config object
docstr_tok: ["Calculates","and","updates","a","few","key","information","to","the","config","object",".","Args",":","config","(","DictConfig",")",":","The","config","object","Returns",":","InferredConfig",":","The","updated","config","object"]
code: def _update_config(self, config) -> InferredConfig:
      """Calculates and updates a few key information to the config object.
  
      Args:
          config (DictConfig): The config object
  
      Returns:
          InferredConfig: The updated config object
      """
      categorical_dim = len(config.categorical_cols)
      continuous_dim = len(config.continuous_cols)
      # self._output_dim_clf = len(np.unique(self.train_dataset.y)) if config.target else None
      # self._output_dim_reg = len(config.target) if config.target else None
      if config.task == "regression":
          # self._output_dim_reg = len(config.target) if config.target else None if self.train is not None:
          output_dim = len(config.target) if config.target else None
      elif config.task == "classification":
          # self._output_dim_clf = len(np.unique(self.train_dataset.y)) if config.target else None
          if self.train is not None:
              output_dim = (
                  len(np.unique(self.train[config.target[0]]))
                  if config.target
                  else None
              )
          else:
              output_dim = (
                  len(np.unique(self.train_dataset.y))
                  if config.target
                  else None
              )
      elif config.task == "ssl":
          output_dim = None
      else:
          raise ValueError(f"{config.task} is an unsupported task.")
      if self.train is not None:
          categorical_cardinality = [
              int(self.train[col].fillna("NA").nunique()) + 1
              for col in config.categorical_cols
          ]
      else:
          categorical_cardinality = [
              int(self.train_dataset.data[col].nunique()) + 1
              for col in config.categorical_cols
          ]
      if getattr(config, "embedding_dims", None) is not None:
          embedding_dims = config.embedding_dims
      else:
          embedding_dims = [
              (x, min(50, (x + 1) // 2))
              for x in categorical_cardinality
          ]
      return InferredConfig(
          categorical_dim=categorical_dim,
          continuous_dim=continuous_dim,
          output_dim=output_dim,
          categorical_cardinality=categorical_cardinality,
          embedding_dims=embedding_dims,
      )
  
imports: import re
  import warnings
  from enum import Enum
  from pathlib import Path
  from typing import Dict, Iterable, List, Optional, Tuple, Union
  import joblib
  import numpy
  import pandas
  import pytorch_lightning
  import torch
  from omegaconf import DictConfig
  from pandas import DataFrame, DatetimeTZDtype, to_datetime
  from pandas.tseries import offsets
  from pandas.tseries.frequencies import to_offset
  from sklearn.base import TransformerMixin, copy
  from sklearn.preprocessing import FunctionTransformer, LabelEncoder, PowerTransformer, QuantileTransformer, StandardScaler
  from torch.utils.data import DataLoader, Dataset
  from pytorch_tabular.config import InferredConfig
  from pytorch_tabular.utils import get_logger
  from .categorical_encoders import OrdinalEncoder
label_desc: Use image node_id 14 for calling the TabularDatamodule obj's underlying member method code with example usage: obj._update_config(config) and returns: InferredConfig