src/transformers/pipelines/base.py/Pipeline/get_iterator
class Pipeline:    def get_iterator(self, inputs, num_workers: int, preprocess_params, forward_params, postprocess_params):
        if "TOKENIZERS_PARALLELISM" not in os.environ:
            logger.info("Disabling tokenizer parallelism, we're using DataLoader multithreading already")
            os.environ["TOKENIZERS_PARALLELISM"] = "false"
        dataset = PipelineDataset(inputs, self.preprocess, preprocess_params)
        dataloader = DataLoader(dataset, num_workers=num_workers, batch_size=1, collate_fn=collate_fn)
        model_iterator = PipelineIterator(dataloader, self.forward, forward_params)
        final_iterator = PipelineIterator(model_iterator, self.postprocess, postprocess_params)
        return final_iterator