在Kedro管道中,节点(类似于python函数)是顺序声明的。在某些情况下,一个节点的输入就是前一个节点的输出。但是,有时,在命令行中调用kedro run API时,节点不会按顺序运行。
在kedro文档中,它说默认情况下按顺序运行节点。
我的run.py代码:
def main(
tags: Iterable[str] = None,env: str = None,runner: Type[AbstractRunner] = None,node_names: Iterable[str] = None,from_nodes: Iterable[str] = None,to_nodes: Iterable[str] = None,from_inputs: Iterable[str] = None,):
project_context = ProjectContext(Path.cwd(),env=env)
project_context.run(
tags=tags,runner=runner,node_names=node_names,from_nodes=from_nodes,to_nodes=to_nodes,from_inputs=from_inputs,)
当前,我的最后一个节点有时在我的前几个节点之前运行。