class_docstr: Simply create one predictor and run it on the DataFlow.
class_docstr_tok: ["Simply","create","one","predictor","and","run","it","on","the","DataFlow","."]
code: def get_result(self):
      self.dataset.reset_state()
      try:
          sz = len(self.dataset)
      except NotImplementedError:
          sz = 0
      with get_tqdm(total=sz, disable=(sz == 0)) as pbar:
          for dp in self.dataset:
              res = self.predictor(*dp)
              yield res
              pbar.update()
  
imports: import multiprocessing
  import os
  from abc import ABCMeta, abstractmethod
  import six
  from ..dataflow import DataFlow
  from ..dataflow.remote import dump_dataflow_to_process_queue
  from ..utils import logger
  from ..utils.develop import HIDE_DOC
  from ..utils.concurrency import DIE, OrderedResultGatherProc, ensure_proc_terminate
  from ..utils.gpu import change_gpu, get_num_gpu
  from ..utils.utils import get_tqdm
  from .base import OfflinePredictor
  from .concurrency import MultiProcessQueuePredictWorker
  from .config import PredictConfig
label_desc: Use image node_id 2 for calling the SimpleDatasetPredictor obj's underlying member method code with example usage: obj.get_result() without return types