Skip to content

Commit 5298486

Browse files
authored
Update pipeline to Pipeline in docs (#5155)
* Update pipeline to Pipeline in docs Signed-off-by: Ankita Katiyar <[email protected]> * Also update test starter Signed-off-by: Ankita Katiyar <[email protected]> --------- Signed-off-by: Ankita Katiyar <[email protected]>
1 parent 0afcc43 commit 5298486

File tree

5 files changed

+31
-31
lines changed

5 files changed

+31
-31
lines changed

docs/tutorials/add_another_pipeline.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -297,40 +297,40 @@ First, add namespaces to the modelling component of the data science pipeline to
297297

298298
??? example "View code"
299299
```python
300-
from kedro.pipeline import Pipeline, node, pipeline
300+
from kedro.pipeline import Node, Pipeline
301301
302302
from .nodes import evaluate_model, split_data, train_model
303303
304304
305305
def create_pipeline(**kwargs) -> Pipeline:
306-
pipeline_instance = pipeline(
306+
pipeline_instance = Pipeline(
307307
[
308-
node(
308+
Node(
309309
func=split_data,
310310
inputs=["model_input_table", "params:model_options"],
311311
outputs=["X_train", "X_test", "y_train", "y_test"],
312312
name="split_data_node",
313313
),
314-
node(
314+
Node(
315315
func=train_model,
316316
inputs=["X_train", "y_train"],
317317
outputs="regressor",
318318
name="train_model_node",
319319
),
320-
node(
320+
Node(
321321
func=evaluate_model,
322322
inputs=["regressor", "X_test", "y_test"],
323323
outputs=None,
324324
name="evaluate_model_node",
325325
),
326326
]
327327
)
328-
ds_pipeline_1 = pipeline(
328+
ds_pipeline_1 = Pipeline(
329329
nodes=pipeline_instance,
330330
inputs="model_input_table",
331331
namespace="active_modelling_pipeline",
332332
)
333-
ds_pipeline_2 = pipeline(
333+
ds_pipeline_2 = Pipeline(
334334
nodes=pipeline_instance,
335335
inputs="model_input_table",
336336
namespace="candidate_modelling_pipeline",
@@ -442,13 +442,13 @@ You can see this snippet as part of the code you added to the example:
442442
```python
443443
...
444444
445-
ds_pipeline_1 = pipeline(
445+
ds_pipeline_1 = Pipeline(
446446
nodes=pipeline_instance,
447447
inputs="model_input_table",
448448
namespace="active_modelling_pipeline",
449449
)
450450
451-
ds_pipeline_2 = pipeline(
451+
ds_pipeline_2 = Pipeline(
452452
nodes=pipeline_instance,
453453
inputs="model_input_table",
454454
namespace="candidate_modelling_pipeline",

docs/tutorials/create_a_pipeline.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,23 +89,23 @@ Next, take a look at `src/spaceflights/pipelines/data_processing/pipeline.py` wh
8989

9090
??? example "View code"
9191
```python
92-
from kedro.pipeline import Pipeline, node, pipeline
92+
from kedro.pipeline import Node, Pipeline
9393

9494
from .nodes import preprocess_companies, preprocess_shuttles
9595

9696
...
9797

9898

9999
def create_pipeline(**kwargs) -> Pipeline:
100-
return pipeline(
100+
return Pipeline(
101101
[
102-
node(
102+
Node(
103103
func=preprocess_companies,
104104
inputs="companies",
105105
outputs="preprocessed_companies",
106106
name="preprocess_companies_node",
107107
),
108-
node(
108+
Node(
109109
func=preprocess_shuttles,
110110
inputs="shuttles",
111111
outputs="preprocessed_shuttles",
@@ -228,27 +228,27 @@ The node is created in `src/kedro_tutorial/pipelines/data_processing/pipeline.py
228228

229229
??? example "View code"
230230
```python
231-
from kedro.pipeline import Pipeline, node, pipeline
231+
from kedro.pipeline import Node, Pipeline
232232

233233
from .nodes import create_model_input_table, preprocess_companies, preprocess_shuttles
234234

235235

236236
def create_pipeline(**kwargs) -> Pipeline:
237-
return pipeline(
237+
return Pipeline(
238238
[
239-
node(
239+
Node(
240240
func=preprocess_companies,
241241
inputs="companies",
242242
outputs="preprocessed_companies",
243243
name="preprocess_companies_node",
244244
),
245-
node(
245+
Node(
246246
func=preprocess_shuttles,
247247
inputs="shuttles",
248248
outputs="preprocessed_shuttles",
249249
name="preprocess_shuttles_node",
250250
),
251-
node(
251+
Node(
252252
func=create_model_input_table,
253253
inputs=["preprocessed_shuttles", "preprocessed_companies", "reviews"],
254254
outputs="model_input_table",

docs/tutorials/test_a_project.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,26 +137,26 @@ Consider the data science pipeline as a whole:
137137

138138
??? example "View code"
139139
```python
140-
from kedro.pipeline import Pipeline, node, pipeline
140+
from kedro.pipeline import Node, Pipeline
141141
from .nodes import evaluate_model, split_data, train_model
142142

143143

144144
def create_pipeline(**kwargs) -> Pipeline:
145-
return pipeline(
145+
return Pipeline(
146146
[
147-
node(
147+
Node(
148148
func=split_data,
149149
inputs=["model_input_table", "params:model_options"],
150150
outputs=["X_train", "X_test", "y_train", "y_test"],
151151
name="split_data_node",
152152
),
153-
node(
153+
Node(
154154
func=train_model,
155155
inputs=["X_train", "y_train"],
156156
outputs="regressor",
157157
name="train_model_node",
158158
),
159-
node(
159+
Node(
160160
func=evaluate_model,
161161
inputs=["regressor", "X_test", "y_test"],
162162
outputs=None,

features/test_starter/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/pipelines/data_engineering/pipeline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
Delete this when you start working on your own Kedro project.
55
"""
66

7-
from kedro.pipeline import node, pipeline
7+
from kedro.pipeline import Node, Pipeline
88

99
from .nodes import split_data
1010

1111

1212
def create_pipeline(**kwargs):
13-
return pipeline(
13+
return Pipeline(
1414
[
15-
node(
15+
Node(
1616
split_data,
1717
["example_iris_data", "params:example_test_data_ratio"],
1818
dict(

features/test_starter/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/pipelines/data_science/pipeline.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
Delete this when you start working on your own Kedro project.
55
"""
66

7-
from kedro.pipeline import node, pipeline
7+
from kedro.pipeline import Node, Pipeline
88

99
from .nodes import predict, report_accuracy, train_model
1010

1111

1212
def create_pipeline(**kwargs):
13-
return pipeline(
13+
return Pipeline(
1414
[
15-
node(
15+
Node(
1616
train_model,
1717
["example_train_x", "example_train_y", "parameters"],
1818
"example_model",
1919
),
20-
node(
20+
Node(
2121
predict,
2222
dict(model="example_model", test_x="example_test_x"),
2323
"example_predictions",
2424
),
25-
node(report_accuracy, ["example_predictions", "example_test_y"], None),
25+
Node(report_accuracy, ["example_predictions", "example_test_y"], None),
2626
]
2727
)

0 commit comments

Comments
 (0)