class_docstr: Hook used to trigger the profiling features of VISSL
docstr: Called at the start of training.
code: def on_start(self, task: "tasks.ClassyTask") -> None:
      """
      Called at the start of training.
      """
      if self.profile_by_layer_memory:
          assert (
              task.use_gpu is True
          ), "Profiling memory usage requires training on GPU"
      if self.profile_by_layer_memory and self.start_iteration == 0:
          self.layer_memory_tracker.monitor(task.base_model)
      if self.profile_runtime:
          self.runtime_profiler.__enter__()
  
imports: import logging
  import os
  import torch
  import torch.nn
  from classy_vision import tasks
  from classy_vision.hooks.classy_hook import ClassyHook
  from fairscale.nn import FullyShardedDataParallel
  from fairscale.nn.misc import FlattenParamsWrapper
  from torch.nn import SyncBatchNorm
  from vissl.config.attr_dict import AttrDict
  from vissl.utils.env import get_machine_local_and_dist_rank
  from vissl.utils.layer_memory_tracking import LayerwiseMemoryTracker
  from vissl.utils.profiler import create_runtime_profiler
label_desc: Use image node_id 3 for calling the ProfilingHook obj's underlying member method code with example usage: obj.on_start(task) without return types