kedro.pipeline.modular_pipeline.pipeline — Kedro 0.17.6 documentation

# kedro.pipeline.modular_pipeline.pipeline

`kedro.pipeline.modular_pipeline.` `pipeline`(pipe, *, inputs=None, outputs=None, parameters=None, namespace=None)

  Create a copy of the pipeline and its nodes, with some dataset names and node names modified.

  Parameters

    - pipe (`Pipeline`) – Original modular pipeline to integrate

    - inputs (`Union`[`str`, `Set`[`str`], `Dict`[`str`, `str`], `None`]) – A name or collection of input names to be exposed as connection points to other pipelines upstream. When str or Set[str] is provided, the listed input names will stay the same as they are named in the provided pipeline. When Dict[str, str] is provided, current input names will be mapped to new names. Must only refer to the pipeline’s free inputs.

    - outputs (`Union`[`str`, `Set`[`str`], `Dict`[`str`, `str`], `None`]) – A name or collection of names to be exposed as connection points to other pipelines downstream. When str or Set[str] is provided, the listed output names will stay the same as they are named in the provided pipeline. When Dict[str, str] is provided, current output names will be mapped to new names. Can refer to both the pipeline’s free outputs, as well as intermediate results that need to be exposed.

    - parameters (`Optional`[`Dict`[`str`, `str`]]) – A map of existing parameter to the new one.

    - namespace (`Optional`[`str`]) – A prefix to give to all dataset names, except those explicitly named with the inputs/outputs arguments, and parameter references (params: and parameters).

  Raises

    - ModularPipelineError – When inputs, outputs or parameters are incorrectly specified, or they do not exist on the original pipeline.

    - ValueError – When underlying pipeline nodes inputs/outputs are not any of the expected types (str, dict, list, or None).

  Return type

    `Pipeline`

  Returns

    A new `Pipeline` object with the new nodes, modified as requested.