class_docstr: A callback to fetch predictions during the training loop
class_docstr_tok: ["A","callback","to","fetch","predictions","during","the","training","loop"]
code: def __init__(
      self,
      ds_idx: int = 1,  # Index of dataset, 0 for train, 1 for valid, used if `dl` is not present
      dl: DataLoader = None,  # `DataLoader` used for fetching `Learner` predictions
      with_input: bool = False,  # Whether to return inputs in `GatherPredsCallback`
      with_decoded: bool = False,  # Whether to return decoded predictions
      cbs: Callback
      | MutableSequence = None,  # `Callback` to temporarily remove from `Learner`
      reorder: bool = True,  # Whether to sort prediction results
  ):
      self.cbs = L(cbs)
      store_attr("ds_idx,dl,with_input,with_decoded,reorder")
  
imports: from __future__ import annotations
  from ..data.all import *
  from ..optimizer import *
  from ..losses import BaseLoss
label_desc: Use image node_id 1 to create a new FetchPredsCallback object from inherited base classes: Callback with example: obj = FetchPredsCallback(ds_idx, dl, with_input, with_decoded, cbs, reorder)