code: def on_start(
      self, task: "flash.image.embedding.vissl.adapter.MockVISSLTask"
  ) -> None:
      lightning_module = task.vissl_adapter.adapter_task
      task.device = lightning_module.device
  
      # get around vissl distributed training by setting MockTask flags
      num_nodes = lightning_module.trainer.num_nodes
      accelerators_ids = getattr(
          lightning_module.trainer,
          "device_ids",
          getattr(
              accelerator_connector(lightning_module.trainer),
              "parallel_device_ids",
              None,
          ),
      )
      accelerator_per_node = (
          len(accelerators_ids) if accelerators_ids is not None else 1
      )
      task.world_size = num_nodes * accelerator_per_node
  
      if lightning_module.trainer.max_epochs is None:
          lightning_module.trainer.max_epochs = 1
  
      task.max_iteration = (
          lightning_module.trainer.max_epochs
          * lightning_module.trainer.num_training_batches
      )
  
file_path: lightning-flash/src/flash/image/embedding/vissl/hooks.py
imports: from typing import Any, List
  import torch
  from pytorch_lightning.core.hooks import ModelHooks
  import flash
  from flash.core.utilities.compatibility import accelerator_connector
  from flash.core.utilities.imports import _VISSL_AVAILABLE
label_desc: Use image node_id 2 for calling the TrainingSetupHook obj's underlying member method code with example usage: obj.on_start(task) without return types