diff --git a/docs/source/nodes_and_pipelines/run_a_pipeline.md b/docs/source/nodes_and_pipelines/run_a_pipeline.md index 5f17d6e9fc..8b138221bf 100644 --- a/docs/source/nodes_and_pipelines/run_a_pipeline.md +++ b/docs/source/nodes_and_pipelines/run_a_pipeline.md @@ -233,99 +233,6 @@ Out[11]: {'v': 0.666666666666667} - -## Output to a file - -We can also use IO to save outputs to a file. In this example, we define a custom `LambdaDataset` that would serialise the output to a file locally: - -```{warning} -`LambdaDataset` has been deprecated and will be removed in Kedro `0.20.0`. -``` - -
-Click to expand - - -```python -def save(value): - with open("./data/07_model_output/variance.pickle", "wb") as f: - pickle.dump(value, f) - - -def load(): - with open("./data/07_model_output/variance.pickle", "rb") as f: - return pickle.load(f) - - -pickler = LambdaDataset(load=load, save=save) -io.add("v", pickler) -``` -
- -It is important to make sure that the data catalog variable name `v` matches the name `v` in the pipeline definition. - -Next we can confirm that this `LambdaDataset` behaves correctly: - -
-Click to expand - -```python -io.save("v", 5) -``` - -```python -io.load("v") -``` - -`Ouput`: - -```Console -Out[12]: 5 -``` -
- -Finally, let's run the pipeline again now and serialise the output: - -
-Click to expand - - -```python -SequentialRunner().run(pipeline, catalog=io) -``` - -`Ouput`: - -```console -Out[13]: {} -``` -
- -The output has been persisted to a local file so we don't see it directly, but it can be retrieved from the catalog: - -
-Click to expand - - -```python -io.load("v") -``` - -`Ouput`: - -```console -Out[14]: 0.666666666666667 -``` - -```python -try: - os.remove("./data/07_model_output/variance.pickle") -except FileNotFoundError: - pass -``` -
- - ## Configure `kedro run` arguments The [Kedro CLI documentation](../development/commands_reference.md#run-the-project) lists the available CLI options for `kedro run`. You can alternatively supply a configuration file that contains the arguments to `kedro run`.