class_docstr: Switch the mode of YOLOX during training.
  
  This hook turns off the mosaic and mixup data augmentation and switches
  to use L1 loss in bbox_head.
  
  Args:
      num_last_epochs (int): The number of latter epochs in the end of the
          training to close the data augmentation and switch to L1 loss.
          Defaults to 15.
     skip_type_keys (Sequence[str], optional): Sequence of type string to be
          skip pipeline. Defaults to ('Mosaic', 'RandomAffine', 'MixUp').
code: def __init__(
      self,
      num_last_epochs: int = 15,
      skip_type_keys: Sequence[str] = (
          "Mosaic",
          "RandomAffine",
          "MixUp",
      ),
  ) -> None:
      self.num_last_epochs = num_last_epochs
      self.skip_type_keys = skip_type_keys
      self._restart_dataloader = False
      self._has_switched = False
  
file_path: mmdetection/mmdet/engine/hooks/yolox_mode_switch_hook.py
imports: from typing import Sequence
  from mmengine.hooks import Hook
  from mmengine.model import is_model_wrapper
  from mmdet.registry import HOOKS
label_desc: Use image node_id 1 to create a new YOLOXModeSwitchHook object from inherited base classes: Hook with example: obj = YOLOXModeSwitchHook(num_last_epochs, skip_type_keys)