Skip to content

Commit

Permalink
[KED-2419] Make pipeline and Pipeline consistent (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonymilne authored Feb 11, 2022
1 parent 2b23ec8 commit ed0be30
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 24 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,4 @@ workflows:
- lint_38
- lint_37
- lint_36

Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
Delete this when you start working on your own Kedro project.
"""

from kedro.pipeline import Pipeline, node
from kedro.pipeline import node, pipeline

from .nodes import split_data


def create_pipeline(**kwargs):
return Pipeline(
return pipeline(
[
node(
split_data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
Delete this when you start working on your own Kedro project.
"""

from kedro.pipeline import Pipeline, node
from kedro.pipeline import node, pipeline

from .nodes import predict, report_accuracy, train_model


def create_pipeline(**kwargs):
return Pipeline(
return pipeline(
[
node(
train_model,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
Delete this when you start working on your own Kedro project.
"""

from kedro.pipeline import Pipeline, node
from kedro.pipeline import node, pipeline

from .nodes import split_data


def create_pipeline(**kwargs):
return Pipeline(
return pipeline(
[
node(
split_data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
Delete this when you start working on your own Kedro project.
"""

from kedro.pipeline import Pipeline, node
from kedro.pipeline import node, pipeline

from .nodes import predict, report_accuracy, train_model


def create_pipeline(**kwargs):
return Pipeline(
return pipeline(
[
node(
train_model,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""Example data engineering pipeline with PySpark.
"""

from kedro.pipeline import Pipeline, node
from kedro.pipeline import node, pipeline

from .nodes import split_data, transform_features


def create_pipeline(**kwargs):
return Pipeline(
return pipeline(
[
node(
transform_features,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""Example data science pipeline using PySpark.
"""

from kedro.pipeline import Pipeline, node
from kedro.pipeline import node, pipeline

from .nodes import predict, report_accuracy, train_model


def create_pipeline(**kwargs):
return Pipeline(
return pipeline(
[
node(
train_model,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Project pipelines."""
from typing import Dict

from kedro.pipeline import Pipeline
from kedro.pipeline import Pipeline, pipeline


def register_pipelines() -> Dict[str, Pipeline]:
Expand All @@ -11,4 +11,4 @@ def register_pipelines() -> Dict[str, Pipeline]:
A mapping from a pipeline name to a ``Pipeline`` object.
"""
return {"__default__": Pipeline([])}
return {"__default__": pipeline([])}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ model_options:
- review_scores_rating

model_options_experimental:
test_size: 0.3
test_size: 0.2
random_state: 8
features:
- engines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ nbstripout~=0.4
pytest-cov~=3.0
pytest-mock>=1.7.1, <2.0
pytest~=6.2
scikit-learn~=0.24
scikit-learn~=1.0; python_version > '3.6'
scikit-learn~=0.24; python_version == '3.6'
wheel>=0.35, <0.37
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def create_pipeline(**kwargs) -> Pipeline:
pipeline_instance = Pipeline(
return pipeline(
[
node(
func=preprocess_companies,
Expand All @@ -25,13 +25,8 @@ def create_pipeline(**kwargs) -> Pipeline:
outputs="model_input_table",
name="create_model_input_table_node",
),
]
)

namespaced_pipeline = pipeline(
pipe=pipeline_instance,
],
namespace="data_processing",
inputs=["companies", "shuttles", "reviews"],
outputs="model_input_table",
)
return namespaced_pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def create_pipeline(**kwargs) -> Pipeline:
pipeline_instance = Pipeline(
pipeline_instance = pipeline(
[
node(
func=split_data,
Expand Down

0 comments on commit ed0be30

Please sign in to comment.