quantumtrope
08/23/2023, 8:31 PMNok Lam Chan
08/23/2023, 9:02 PMLodewic van Twillert
08/24/2023, 7:35 AMdef register_pipelines() -> dict[str, Pipeline]:
"""Register the project's pipelines.
Returns:
A mapping from pipeline names to ``Pipeline`` objects.
"""
namespaces = ["test_run", "baseline"]
# pipeline A creates a dataset which can be used as input to B
pipeline_A = pipeline([
node(func=input_A_to_my_dataset, inputs="params:parameters-for-A", outputs="my_dataset")
])
# you can also create input to B from parameters
input_from_params_B = pipeline([
node(func=dataset_from_params, inputs="params:stand-in-dataset", outputs="my_dataset")
])
# given an input, this is the 'core' pipeline for B
core_B = pipeline([
node(func=do_B_with_dataset, inputs=["my_dataset", "params:parameters-for-B"] outputs="my_dataset")
])
pipelines: dict[str, Pipeline] = dict(
A=pipeline_A,
B=input_from_params_B + core_B,
B_with_A=pipeline_A + core_B
)
pipelines["__default__"] = pipelines["B_with_A"]
return pipelines
quantumtrope
08/24/2023, 2:59 PMregister_pipelines
works so well I forgot that I should just overwrite it.