pipeline.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:DeepFramework 作者: issey173 项目源码 文件源码
def __init__(self, core_classes_map):
        """Creates a Pipeline object.

        Args:
            core_classes_map (list[dict]): Each element in the list corresponds to a Core. The element must be a
                dictionary with the key Pipeline.KEY_CLASS and value the class that should be instantiated (the Core
                subclass). You can provide arguments to the constructor using the key Pipeline.KEY_KWARGS.
        """

        self.input_pipe, self.output_pipe = self._construct_pipes(core_classes_map)
        # Instantiate the core classes, connecting them with the created pipes
        self.cores = [core_class[self.KEY_CLASS](**core_class[self.KEY_KWARGS]) for core_class in core_classes_map]
        self.started = False
        self.results_manager = Manager()
        self.results = self.results_manager.dict()
        self.results_producer = PipeConsumer(self.output_pipe, self.results)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号