Skip to content

Commit

Permalink
remove unwanted prints
Browse files Browse the repository at this point in the history
  • Loading branch information
rashidakanchwala committed May 16, 2024
1 parent 58cc320 commit 78b66aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 45 deletions.
53 changes: 11 additions & 42 deletions demo-project/src/demo_project/pipeline_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,6 @@
from demo_project.pipelines import modelling as mod
from demo_project.pipelines import reporting as rep

def create_pipeline(**kwargs) -> Pipeline:
data_processing_pipeline = pipeline(
[
node(
lambda x: x,
inputs=["raw_data"],
outputs="model_inputs",
name="process_data",
tags=["split"],
)
],
namespace="uk.something1.data_processing",
outputs="model_inputs",
)
data_science_pipeline = pipeline(
[
node(
lambda x: x,
inputs=["model_inputs"],
outputs="model",
name="train_model",
tags=["train"],
)
],
namespace="uk.something2.data_science",
inputs="model_inputs",
)
return data_processing_pipeline + data_science_pipeline


def register_pipelines() -> Dict[str, Pipeline]:
"""Register the project's pipelines.
Expand All @@ -58,16 +28,15 @@ def register_pipelines() -> Dict[str, Pipeline]:


return {
"__default__": create_pipeline(),
# "__default__": (
# ingestion_pipeline
# + feature_pipeline
# + modelling_pipeline
# + reporting_pipeline
# ),
# "Data ingestion": ingestion_pipeline,
# "Modelling stage": modelling_pipeline,
# "Feature engineering": feature_pipeline,
# "Reporting stage": reporting_pipeline,
# "Pre-modelling": ingestion_pipeline + feature_pipeline,
"__default__": (
ingestion_pipeline
+ feature_pipeline
+ modelling_pipeline
+ reporting_pipeline
),
"Data ingestion": ingestion_pipeline,
"Modelling stage": modelling_pipeline,
"Feature engineering": feature_pipeline,
"Reporting stage": reporting_pipeline,
"Pre-modelling": ingestion_pipeline + feature_pipeline,
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ def add_children(self, modular_pipeline_id: str, task_nodes: List[GraphNode]):
modular_pipeline.outputs
)

# The line `parent_modular_pipeline_id = ('.'.join(modular_pipeline_id.split('.')[:-1]) if '.' in
# modular_pipeline_id else None)` is extracting the parent modular pipeline ID from the given
# modular pipeline ID.
parent_modular_pipeline_id = (
'.'.join(modular_pipeline_id.split('.')[:-1]) if '.' in modular_pipeline_id else None
)

print("Modular Pipeline ID", modular_pipeline_id)
print("Parent Modular Pipeline ID", parent_modular_pipeline_id)
if parent_modular_pipeline_id:
parent_modular_pipeline = self.get_or_create_modular_pipeline(
parent_modular_pipeline_id
Expand Down

0 comments on commit 78b66aa

Please sign in to comment.