class_docstr: The ``IceVisionAdapter`` is an :class:`~flash.core.adapter.Adapter` for integrating with IceVision.
code: def __init__(
      self,
      model_type,
      model,
      icevision_adapter,
      backbone,
      predict_kwargs,
  ):
      super().__init__()
  
      # Modules can't be pickled so just store the name
      self.model_type = model_type.__name__
      self.model = model
      self.icevision_adapter = wrap_icevision_adapter(icevision_adapter)
      self.backbone = backbone
      self.predict_kwargs = predict_kwargs
  
imports: import functools
  from importlib import import_module
  from typing import Any, Dict, Optional
  from torch import Tensor
  from torch.utils.data import DataLoader, Sampler
  import flash
  from flash.core.adapter import Adapter
  from flash.core.data.io.input import DataKeys, InputBase
  from flash.core.data.io.input_transform import InputTransform, create_worker_input_transform_processor
  from flash.core.integrations.icevision.transforms import from_icevision_predictions, from_icevision_record, to_icevision_record
  from flash.core.integrations.icevision.wrappers import wrap_icevision_adapter
  from flash.core.model import Task
  from flash.core.utilities.imports import _ICEVISION_AVAILABLE
  from flash.core.utilities.stages import RunningStage
  from flash.core.utilities.url_error import catch_url_error
label_desc: Use image node_id 1 to create a new IceVisionAdapter object from inherited base classes: Adapter with example: obj = IceVisionAdapter(model_type, model, icevision_adapter, backbone, predict_kwargs)