Skip to content

Commit

Permalink
Explain "free" inputs and outputs in pipeline docs (#2824)
Browse files Browse the repository at this point in the history
* Explain "free" inputs and outputs in pipeline docs

* Remove unnecessary/inconsistent def of instantiate

* Update docs/source/nodes_and_pipelines/modular_pipelines.md

* Use MyST reference roles

Co-authored-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Update docs/source/nodes_and_pipelines/modular_pipelines.md

---------

Co-authored-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
  • Loading branch information
deepyaman and astrojuanlu authored Jul 25, 2023
1 parent e2464b8 commit 48d94a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/source/nodes_and_pipelines/modular_pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,13 @@ In this example we have used the `+` operator to join two pipelines. You can als
Reusing pipelines for slightly different purposes can be a real accelerator for teams and organisations when they reach a certain scale. In the real world, one could imagine pipelines with responsibilities like profiling or feature engineering being reused within the same project or even across projects via [micro-packaging](micro_packaging.md).

* In an ideal world, we would like to use the `cook_pipeline` twice as you would `defrost` and `grill` multiple meals beyond the `veg` currently hard-coded.
* Namespaces allow you to '[instantiate](https://en.wikipedia.org/wiki/Instance_(computer_science))' the same pipeline multiple times and keep operations isolated.
* Namespaces allow you to instantiate the same pipeline multiple times and keep operations isolated.
* Like one provides arguments to a class' constructor, you can provide overriding inputs/outputs/parameters to the `pipeline()` wrapper.

```{note}
The set of overriding inputs and outputs must be a subset of the reused pipeline's "free" inputs and outputs, respectively. A free input is an input that isn't generated by a node in the pipeline, while a free output is an output that isn't consumed by a node in the pipeline. {py:meth}`Pipeline.inputs() <kedro.pipeline.Pipeline.inputs>` and {py:meth}`Pipeline.outputs() <kedro.pipeline.Pipeline.outputs>` can be used to list a pipeline's free inputs and outputs, respectively.
```

<details>
<summary>Click here to see a worked example</summary>

Expand Down

0 comments on commit 48d94a6

Please sign in to comment.