docstr: Defines the transform to be applied on a single sample on device for the predicting stage.
  
  The input data of the transform would have the following form::
  
      {
          DataKeys.INPUT: ...,
          DataKeys.TARGET: ...,
          DataKeys.METADATA: ...,
      }
  
  You would need to use :class:`flash.core.data.transforms.ApplyToKeys` as follows:
  
  .. code-block:: python
  
      from flash.core.data.transforms import ApplyToKeys
  
  
      class MyInputTransform(InputTransform):
          def per_sample_transform_on_device(self) -> Callable:
              return ApplyToKeys("input", my_func)
docstr_tok: ["Defines","the","transform","to","be","applied","on","a","single","sample","on","device","for","the","predicting","stage",".","The","input","data","of","the","transform","would","have","the","following","form",":",":","{","DataKeys.INPUT",":","...",",","DataKeys.TARGET",":","...",",","DataKeys.METADATA",":","...",",","}","You","would","need","to","use",":","class",":","`","flash.core.data.transforms.ApplyToKeys","`","as","follows",":","..","code-block",":",":","python","from","flash.core.data.transforms","import","ApplyToKeys","class","MyInputTransform","(","InputTransform",")",":","def","per_sample_transform_on_device","(","self",")","-",">","Callable",":","return","ApplyToKeys","(","``","input","''",",","my_func",")"]
code: def predict_per_sample_transform_on_device(self) -> Callable:
      """Defines the transform to be applied on a single sample on device for the predicting stage.
  
      The input data of the transform would have the following form::
  
          {
              DataKeys.INPUT: ...,
              DataKeys.TARGET: ...,
              DataKeys.METADATA: ...,
          }
  
      You would need to use :class:`flash.core.data.transforms.ApplyToKeys` as follows:
  
      .. code-block:: python
  
          from flash.core.data.transforms import ApplyToKeys
  
  
          class MyInputTransform(InputTransform):
              def per_sample_transform_on_device(self) -> Callable:
                  return ApplyToKeys("input", my_func)
  
      """
      return self.per_sample_transform_on_device()
  
imports: import inspect
  from dataclasses import dataclass
  from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
  from pytorch_lightning.utilities import rank_zero_warn
  from pytorch_lightning.utilities.enums import LightningEnum
  from flash.core.data.callback import ControlFlow
  from flash.core.data.utilities.collate import default_collate
  from flash.core.data.utils import _STAGES_PREFIX
  from flash.core.utilities.stages import RunningStage
  from flash.core.utilities.types import INPUT_TRANSFORM_TYPE
label_desc: Use image node_id 13 for calling the InputTransform obj's underlying member method code with example usage: obj.predict_per_sample_transform_on_device() and returns: self