class_docstr: This Base Class is used to create visualization tool on top of
  :class:`~flash.core.data.io.input_transform.InputTransform` hooks.
  
  Override any of the ``show_{_hook_name}`` to receive the associated data and visualize them.
  
  Example::
  
      from flash.image import ImageClassificationData
      from flash.core.data.base_viz import BaseVisualization
  
      class CustomBaseVisualization(BaseVisualization):
  
          def show_load_sample(self, samples: List[Any], running_stage):
              # plot samples
  
          def show_per_sample_transform(self, samples: List[Any], running_stage):
              # plot samples
  
          def show_collate(self, batch: List[Any], running_stage):
              # plot batch
  
          def show_per_batch_transform(self, batch: List[Any], running_stage):
              # plot batch
  
      class CustomImageClassificationData(ImageClassificationData):
  
          @staticmethod
          def configure_data_fetcher(*args, **kwargs) -> BaseDataFetcher:
              return CustomBaseVisualization(*args, **kwargs)
  
      dm = CustomImageClassificationData.from_folders(
          train_folder="./data/train",
          val_folder="./data/val",
          test_folder="./data/test",
          predict_folder="./data/predict")
  
      # visualize a ``train`` batch
      dm.show_train_batches()
  
      # visualize next ``train`` batch
      dm.show_train_batches()
  
      # visualize a ``val`` batch
      dm.show_val_batches()
  
      # visualize a ``test`` batch
      dm.show_test_batches()
  
      # visualize a ``predict`` batch
      dm.show_predict_batches()
  
  .. note::
  
      If the user wants to plot all different transformation stages at once,
      override the ``show`` function directly.
  
  Example::
  
      class CustomBaseVisualization(BaseVisualization):
  
          def show(self, batch: Dict[str, Any], running_stage: RunningStage):
              print(batch)
              # out
              {
                  'load_sample': [...],
                  'per_sample_transform': [...],
                  'collate': [...],
                  'per_batch_transform': [...],
              }
  
  .. note::
  
      As the :class:`~flash.core.data.io.input_transform.InputTransform` hooks are injected within
      the threaded workers of the DataLoader,
      the data won't be accessible when using ``num_workers > 0``.
class_docstr_tok: ["This","Base","Class","is","used","to","create","visualization","tool","on","top","of",":","class",":","`","~flash.core.data.io.input_transform.InputTransform","`","hooks",".","Override","any","of","the","``","show_","{","_hook_name","}","``","to","receive","the","associated","data","and","visualize","them",".","Example",":",":","from","flash.image","import","ImageClassificationData","from","flash.core.data.base_viz","import","BaseVisualization","class","CustomBaseVisualization","(","BaseVisualization",")",":","def","show_load_sample","(","self",",","samples",":","List","[","Any","]",",","running_stage",")",":","#","plot","samples","def","show_per_sample_transform","(","self",",","samples",":","List","[","Any","]",",","running_stage",")",":","#","plot","samples","def","show_collate","(","self",",","batch",":","List","[","Any","]",",","running_stage",")",":","#","plot","batch","def","show_per_batch_transform","(","self",",","batch",":","List","[","Any","]",",","running_stage",")",":","#","plot","batch","class","CustomImageClassificationData","(","ImageClassificationData",")",":","@","staticmethod","def","configure_data_fetcher","(","*","args",",","*","*","kwargs",")","-",">","BaseDataFetcher",":","return","CustomBaseVisualization","(","*","args",",","*","*","kwargs",")","dm","=","CustomImageClassificationData.from_folders","(","train_folder=","''",".\/data\/train","''",",","val_folder=","''",".\/data\/val","''",",","test_folder=","''",".\/data\/test","''",",","predict_folder=","''",".\/data\/predict","''",")","#","visualize","a","``","train","``","batch","dm.show_train_batches","(",")","#","visualize","next","``","train","``","batch","dm.show_train_batches","(",")","#","visualize","a","``","val","``","batch","dm.show_val_batches","(",")","#","visualize","a","``","test","``","batch","dm.show_test_batches","(",")","#","visualize","a","``","predict","``","batch","dm.show_predict_batches","(",")","..","note",":",":","If","the","user","wants","to","plot","all","different","transformation","stages","at","once",",","override","the","``","show","``","function","directly",".","Example",":",":","class","CustomBaseVisualization","(","BaseVisualization",")",":","def","show","(","self",",","batch",":","Dict","[","str",",","Any","]",",","running_stage",":","RunningStage",")",":","print","(","batch",")","#","out","{","'load_sample","'",":","[","...","]",",","'per_sample_transform","'",":","[","...","]",",","'collate","'",":","[","...","]",",","'per_batch_transform","'",":","[","...","]",",","}","..","note",":",":","As","the",":","class",":","`","~flash.core.data.io.input_transform.InputTransform","`","hooks","are","injected","within","the","threaded","workers","of","the","DataLoader",",","the","data","wo","n't","be","accessible","when","using","``","num_workers",">","0","``","."]
docstr: Override to visualize ``per_sample_transform`` output data.
docstr_tok: ["Override","to","visualize","``","per_sample_transform","``","output","data","."]
code: def show_per_sample_transform(
      self,
      samples: List[Any],
      running_stage: RunningStage,
      limit_nb_samples: int = None,
      figsize: Tuple[int, int] = (6.4, 4.8),
  ):
      """Override to visualize ``per_sample_transform`` output data."""
  
file_path: lightning-flash/src/flash/core/data/base_viz.py
imports: from typing import Any, Dict, List, Set, Tuple
  from pytorch_lightning.utilities.model_helpers import is_overridden
  from flash.core.data.callback import BaseDataFetcher
  from flash.core.data.utils import _CALLBACK_FUNCS
  from flash.core.utilities.stages import RunningStage
label_desc: Use image node_id 4 for calling the BaseVisualization obj's underlying member method code with example usage: obj.show_per_sample_transform(samples, running_stage, limit_nb_samples, figsize) without return types