class_docstr: Base class for Image-Text multi-modal learning
  
  Args:
      opts: command-line arguments
class_docstr_tok: ["Base","class","for","Image-Text","multi-modal","learning","Args",":","opts",":","command-line","arguments"]
docstr: Data augmentation during training.
  
  The default order is RandomResizedCrop, Optional[RandAugment or AutoAugment], ToTensor, Optional[RandomErase]
  
  Args:
      size: Size for resizing the input image. Expected to be a tuple (height, width)
  
  Returns:
      An instance of `data.transforms.image_pil.BaseTransformation.`
  
  .. note::
      1. AutoAugment and RandAugment are mutually exclusive.
      2. Mixup and CutMix are applied on batches are implemented in trainer.
docstr_tok: ["Data","augmentation","during","training",".","The","default","order","is","RandomResizedCrop",",","Optional","[","RandAugment","or","AutoAugment","]",",","ToTensor",",","Optional","[","RandomErase","]","Args",":","size",":","Size","for","resizing","the","input","image",".","Expected","to","be","a","tuple","(","height",",","width",")","Returns",":","An","instance","of","`","data.transforms.image_pil.BaseTransformation.","`","..","note",":",":","1",".","AutoAugment","and","RandAugment","are","mutually","exclusive",".","2",".","Mixup","and","CutMix","are","applied","on","batches","are","implemented","in","trainer","."]
code: def _training_transforms(
      self, size: Tuple[int, int], *args, **kwargs
  ) -> T.BaseTransformation:
      """Data augmentation during training.
  
      The default order is RandomResizedCrop, Optional[RandAugment or AutoAugment], ToTensor, Optional[RandomErase]
  
      Args:
          size: Size for resizing the input image. Expected to be a tuple (height, width)
  
      Returns:
          An instance of `data.transforms.image_pil.BaseTransformation.`
  
      .. note::
          1. AutoAugment and RandAugment are mutually exclusive.
          2. Mixup and CutMix are applied on batches are implemented in trainer.
      """
      aug_list = [
          T.RandomResizedCrop(opts=self.opts, size=size),
      ]
      auto_augment = getattr(
          self.opts, "image_augmentation.auto_augment.enable", False
      )
      rand_augment = getattr(
          self.opts, "image_augmentation.rand_augment.enable", False
      )
      if auto_augment and rand_augment:
          logger.error(
              "AutoAugment and RandAugment are mutually exclusive. Use either of them, but not both"
          )
      elif auto_augment:
          aug_list.append(T.AutoAugment(opts=self.opts))
      elif rand_augment:
          aug_list.append(T.RandAugment(opts=self.opts))
  
      aug_list.append(T.ToTensor(opts=self.opts))
  
      if getattr(
          self.opts, "image_augmentation.random_erase.enable", False
      ):
          aug_list.append(T.RandomErasing(opts=self.opts))
  
      return Compose(opts=self.opts, img_transforms=aug_list)
  
imports: import argparse
  import os
  from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
  import torch
  from PIL import Image
  from torch import Tensor
  from data.collate_fns import COLLATE_FN_REGISTRY
  from data.datasets.dataset_base import BaseImageDataset
  from data.datasets.multi_modal_img_text.zero_shot import BaseZeroShotDataset, build_zero_shot_dataset
  from data.datasets.utils.text import caption_preprocessing
  from data.text_tokenizer import build_tokenizer
  from data.transforms import image_pil
  from data.transforms.common import Compose
  from utils import logger
  from utils.ddp_utils import is_master, is_start_rank_node
label_desc: Use image node_id 7 for calling the BaseMultiModalImgText obj's underlying member method code with example usage: obj._training_transforms(size) and returns: Compose