class_docstr: Mock task class from VISSL to support loss, configs, base_model, last batch etc.
class_docstr_tok: ["Mock","task","class","from","VISSL","to","support","loss",",","configs",",","base_model",",","last","batch","etc","."]
code: def __init__(
      self, vissl_adapter, vissl_loss, task_config, vissl_model
  ) -> None:
      self.vissl_adapter = vissl_adapter
      self.loss = vissl_loss
      self.config = task_config
      self.base_model = vissl_model
      self.model = self.base_model  # set by property in ClassyTask
  
      # set using trainingsetuphook
      self.device = None
  
      self.iteration = 0
      self.max_iteration = 1  # set by training setup hook
  
      # set for momentum teacher based hooks
      self.last_batch = AttrDict(
          {"sample": AttrDict({"input": None, "data_momentum": None})}
      )
  
imports: from typing import Any, List, Union
  import torch
  import torch.nn
  from flash.core.adapter import Adapter
  from flash.core.data.io.input import DataKeys
  from flash.core.model import Task
  from flash.core.utilities.imports import _VISSL_AVAILABLE
  from flash.core.utilities.stability import beta
  from flash.image.embedding.vissl.hooks import AdaptVISSLHooks
label_desc: Use image node_id 1 to create a new MockVISSLTask object  with example: obj = MockVISSLTask(vissl_adapter, vissl_loss, task_config, vissl_model)