kedro.framework.project.find_pipelines

kedro.framework.project.find_pipelines(raise_errors=False)[source]

自动查找具有create_pipeline函数的模块化流水线。默认情况下,使用Kedro 0.18.3及以上版本创建的项目会在创建/添加时调用此函数来自动注册流水线。

需要更精细控制的项目仍然可以在不调用此函数的情况下定义流水线注册表。或者,它们可以修改由find_pipelines函数生成的映射。

For more information on the pipeline registry and autodiscovery, see https://docs.kedro.org/en/stable/nodes_and_pipelines/pipeline_registry.html

Parameters:

raise_errors (bool) – 如果设为True,在发现失败时会抛出错误。

Return type:

dict[str, Pipeline]

Returns:

从流水线名称到Pipeline对象的生成映射。

Raises:

ImportError – 当模块未暴露create_pipeline函数时,或当create_pipeline函数未返回Pipeline对象时,又或模块导入失败时触发。若raise_errors参数为False,请参阅警告部分替代处理。

Warns:

用户警告 - 当模块未暴露create_pipeline函数时,或当create_pipeline函数未返回Pipeline对象时,又或者模块导入一开始就失败的情况下会触发此警告。如果raise_errors参数设为True,请参阅"引发异常"部分替代此警告。