docstr: Data Operations you want to perform on all GPUs, like train-test split, transformations, etc. This is called
  before accessing the dataloaders.
  
  Args:
      stage (Optional[str], optional):
          Internal parameter to distinguish between fit and inference. Defaults to None.
docstr_tok: ["Data","Operations","you","want","to","perform","on","all","GPUs",",","like","train-test","split",",","transformations",",","etc",".","This","is","called","before","accessing","the","dataloaders",".","Args",":","stage","(","Optional","[","str","]",",","optional",")",":","Internal","parameter","to","distinguish","between","fit","and","inference",".","Defaults","to","None","."]
code: def setup(self, stage: Optional[str] = None) -> None:
      """Data Operations you want to perform on all GPUs, like train-test split, transformations, etc. This is called
      before accessing the dataloaders.
  
      Args:
          stage (Optional[str], optional):
              Internal parameter to distinguish between fit and inference. Defaults to None.
      """
      if not (
          stage is None or stage == "fit" or stage == "ssl_finetune"
      ):
          return
      if self.verbose:
          logger.info(
              f"Setting up the datamodule for {self.config.task} task"
          )
      is_ssl = stage == "ssl_finetune"
      if self.validation is None:
          self.train, self.validation = self.split_train_val(self.train)
      else:
          self.validation = self.validation.copy()
      # Preprocessing Train, Validation
      self.train, _ = self.preprocess_data(
          self.train, stage="fit" if not is_ssl else "inference"
      )
      self.validation, _ = self.preprocess_data(
          self.validation, stage="inference"
      )
      self._fitted = True
      self._cache_dataset()
  
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 25 for calling the TabularDatamodule obj's underlying member method code with example usage: obj.setup(stage) without return types