class_docstr: The base class for progress bars in Lightning. It is a :class:`~lightning.pytorch.callbacks.Callback` that keeps
  track of the batch progress in the :class:`~lightning.pytorch.trainer.trainer.Trainer`. You should implement your
  highly custom progress bars with this as the base class.
  
  Example::
  
      class LitProgressBar(ProgressBar):
  
          def __init__(self):
              super().__init__()  # don't forget this :)
              self.enable = True
  
          def disable(self):
              self.enable = False
  
          def on_train_batch_end(self, trainer, pl_module, outputs, batch, batch_idx):
              super().on_train_batch_end(trainer, pl_module, outputs, batch, batch_idx)  # don't forget this :)
              percent = (batch_idx / self.total_train_batches) * 100
              sys.stdout.flush()
              sys.stdout.write(f'{percent:.01f} percent complete \r')
  
      bar = LitProgressBar()
      trainer = Trainer(callbacks=[bar])
class_docstr_tok: ["The","base","class","for","progress","bars","in","Lightning",".","It","is","a",":","class",":","`","~lightning.pytorch.callbacks.Callback","`","that","keeps","track","of","the","batch","progress","in","the",":","class",":","`","~lightning.pytorch.trainer.trainer.Trainer","`",".","You","should","implement","your","highly","custom","progress","bars","with","this","as","the","base","class",".","Example",":",":","class","LitProgressBar","(","ProgressBar",")",":","def","__init__","(","self",")",":","super","(",")",".__init__","(",")","#","do","n't","forget","this",":",")","self.enable","=","True","def","disable","(","self",")",":","self.enable","=","False","def","on_train_batch_end","(","self",",","trainer",",","pl_module",",","outputs",",","batch",",","batch_idx",")",":","super","(",")",".on_train_batch_end","(","trainer",",","pl_module",",","outputs",",","batch",",","batch_idx",")","#","do","n't","forget","this",":",")","percent","=","(","batch_idx","\/","self.total_train_batches",")","*","100","sys.stdout.flush","(",")","sys.stdout.write","(","f","'","{","percent",":",".01f","}","percent","complete","\\r","'",")","bar","=","LitProgressBar","(",")","trainer","=","Trainer","(","callbacks=","[","bar","]",")"]
docstr: The total number of testing batches, which may change from epoch to epoch for current dataloader.
  
  Use this to set the total number of iterations in the progress bar. Can return ``inf`` if the test dataloader is
  of infinite size.
docstr_tok: ["The","total","number","of","testing","batches",",","which","may","change","from","epoch","to","epoch","for","current","dataloader",".","Use","this","to","set","the","total","number","of","iterations","in","the","progress","bar",".","Can","return","``","inf","``","if","the","test","dataloader","is","of","infinite","size","."]
code: def total_test_batches_current_dataloader(self) -> Union[int, float]:
      """The total number of testing batches, which may change from epoch to epoch for current dataloader.
  
      Use this to set the total number of iterations in the progress bar. Can return ``inf`` if the test dataloader is
      of infinite size.
  
      """
      batches = self.trainer.num_test_batches
      if isinstance(batches, list):
          assert self._current_eval_dataloader_idx is not None
          return batches[self._current_eval_dataloader_idx]
      return batches
  
imports: from typing import Any, Dict, Optional, Union
  from typing_extensions import override
  import lightning.pytorch
  from lightning.pytorch.callbacks import Callback
  from lightning.pytorch.utilities.rank_zero import rank_zero_warn
label_desc: Use image node_id 10 for calling the ProgressBar obj's underlying member method code with example usage: obj.total_test_batches_current_dataloader() and returns: batches, batches