class_docstr: The Lightning Base module supporting SimCLR, MoCo and BYOL SSL tasks.
  
  Args:
      model (OmegaConf): An omega conf object intializing the neural-network modle.
          Example configs can be found in `pytorchvideo_trainer/conf/module/model`
      loss(OmegaConf): An omega conf object intializing the loss function.
          Example configs can be found in `pytorchvideo_trainer/conf/module/loss`
      optim (OmegaConf): An omega conf object for constructing the optimizer object.
          The associated config schema can be found at
          `pytorchvideo_trainer.module.optimizer.OptimizerConf`.
          Example configs can be found in `pytorchvideo_trainer/conf/module/optim`
      metrics (OmegaConf): The metrics to track, which will be used for both train,
          validation and test. Example configs can be found in
          `pytorchvideo_trainer/conf/module/metricx`
      lr_scheduler (OmegaConf): An omega conf object associated with learning rate
          scheduler used during trainer.
          The associated config schema can be found at
          `pytorchvideo_trainer.module.lr_policy.LRSchedulerConf`.
          Example configs can be found in `pytorchvideo_trainer/conf/module/lr_scheduler`
      modality_key (str): The modality key used in data processing, default: "video".
      ensemble_method (str): The data ensembling method to control how we accumulate
          the testing results at video level, which is optional. Users may choose from
          ["sum", "max", None], If it is set to None, no data ensembling will be applied.
      knn_memory (OmegaConf): An optional hydra / omeaga conf, if set, initializes KNN
          Memory module to use. Example config can be found at,
          `pytorchvideo_trainer/conf/module/knn_memory`.
      momentum_anneal_cosine (bool): For MoCo and BYOL tasks, if set to true, cosine
          anneals the momentum term used from updating the backbone-history model.
      num_sync_devices (int): Number of gpus to sync bathcnorm over. Only works if
          pytorch lightning trainer's sync_batchnorm parameter is to false.
class_docstr_tok: ["The","Lightning","Base","module","supporting","SimCLR",",","MoCo","and","BYOL","SSL","tasks",".","Args",":","model","(","OmegaConf",")",":","An","omega","conf","object","intializing","the","neural-network","modle",".","Example","configs","can","be","found","in","`","pytorchvideo_trainer\/conf\/module\/model","`","loss","(","OmegaConf",")",":","An","omega","conf","object","intializing","the","loss","function",".","Example","configs","can","be","found","in","`","pytorchvideo_trainer\/conf\/module\/loss","`","optim","(","OmegaConf",")",":","An","omega","conf","object","for","constructing","the","optimizer","object",".","The","associated","config","schema","can","be","found","at","`","pytorchvideo_trainer.module.optimizer.OptimizerConf","`",".","Example","configs","can","be","found","in","`","pytorchvideo_trainer\/conf\/module\/optim","`","metrics","(","OmegaConf",")",":","The","metrics","to","track",",","which","will","be","used","for","both","train",",","validation","and","test",".","Example","configs","can","be","found","in","`","pytorchvideo_trainer\/conf\/module\/metricx","`","lr_scheduler","(","OmegaConf",")",":","An","omega","conf","object","associated","with","learning","rate","scheduler","used","during","trainer",".","The","associated","config","schema","can","be","found","at","`","pytorchvideo_trainer.module.lr_policy.LRSchedulerConf","`",".","Example","configs","can","be","found","in","`","pytorchvideo_trainer\/conf\/module\/lr_scheduler","`","modality_key","(","str",")",":","The","modality","key","used","in","data","processing",",","default",":","``","video","''",".","ensemble_method","(","str",")",":","The","data","ensembling","method","to","control","how","we","accumulate","the","testing","results","at","video","level",",","which","is","optional",".","Users","may","choose","from","[","``","sum","''",",","``","max","''",",","None","]",",","If","it","is","set","to","None",",","no","data","ensembling","will","be","applied",".","knn_memory","(","OmegaConf",")",":","An","optional","hydra","\/","omeaga","conf",",","if","set",",","initializes","KNN","Memory","module","to","use",".","Example","config","can","be","found","at",",","`","pytorchvideo_trainer\/conf\/module\/knn_memory","`",".","momentum_anneal_cosine","(","bool",")",":","For","MoCo","and","BYOL","tasks",",","if","set","to","true",",","cosine","anneals","the","momentum","term","used","from","updating","the","backbone-history","model",".","num_sync_devices","(","int",")",":","Number","of","gpus","to","sync","bathcnorm","over",".","Only","works","if","pytorch","lightning","trainer","'s","sync_batchnorm","parameter","is","to","false","."]
docstr: Called at the very beginning of fit.
  If on DDP it is called on every process.
  
  Peforms conversion of model batchnorm layers into syncbatchnom
  and intialized the KNN module using the dataloader labels.
docstr_tok: ["Called","at","the","very","beginning","of","fit",".","If","on","DDP","it","is","called","on","every","process",".","Peforms","conversion","of","model","batchnorm","layers","into","syncbatchnom","and","intialized","the","KNN","module","using","the","dataloader","labels","."]
code: def on_fit_start(self) -> None:
      """
      Called at the very beginning of fit.
      If on DDP it is called on every process.
  
      Peforms conversion of model batchnorm layers into syncbatchnom
      and intialized the KNN module using the dataloader labels.
      """
  
      self._convert_to_sync_bn()
      if self.knn_memory is not None:
          dataloader = self.trainer.datamodule.train_dataloader()
          self.knn_memory.init_knn_labels(dataloader)
  
imports: import math
  from typing import Any, Callable, Dict, List, Optional
  import numpy
  import pytorchvideo_trainer.module.distributed_utils
  import torch
  import torch.nn
  import torch.nn.functional
  from hydra.utils import instantiate
  from pytorch_lightning.trainer import Trainer
  from pytorchvideo_trainer.module.video_classification import Batch, BatchKey, EnsembleMethod, VideoClassificationModule
label_desc: Use image node_id 2 for calling the SSLBaseModule obj's underlying member method code with example usage: obj.on_fit_start() without return types