You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to show my pipeline as a "collapsable" one on viz, currently only namespace pipeline is possible but it requires me to change how I name my catalog, parameters.
Context
Why is this change important to you? How would you use it? How can it benefit other users?
Namespace is a big change to Kedro pipeline structure and I don't necessary want to buy in to the whole modular pipeline structure. It should be possible to do this purely as a viz feature without changing my Kedro pipeline.
Alternative
Use the keys in pipeline_registry.py as the "subpipeline" for collapase/expand.
Attempt
This is my best attempt to keep dataset/parameters as is, but modular pipeline prevent me to rename intermediate dataset with validation error. How does kedro viz group things into a "namespace"? Is it the node.name attribute, if so how dataset and params are associated with it?
defcreate_pipeline(**kwargs) ->Pipeline:
p=pipeline(
[
node(
func=split_data,
inputs=["model_input_table", "params:model_options"],
outputs=["X_train", "X_test", "y_train", "y_test"],
name="split_data_node",
),
node(
func=train_model,
inputs=["X_train", "y_train"],
outputs="regressor",
name="train_model_node",
),
node(
func=evaluate_model,
inputs=["regressor", "X_test", "y_test"],
outputs=None,
name="evaluate_model_node",
),
],
)
# attempt to escape from namespace so I don't have to rename all dataseti= {}
o= {}
pa= {}
forinpinp.inputs():
print("!!!!", inp)
ifisinstance(inp, dict):
passelifnotinp.startswith("param"):
i[inp] =inpelse:
pa[inp] =inpforoutinp.outputs():
o[out] =outp=pipeline(p, namespace="nok",inputs=i, outputs=o, parameters=pa)
returnp
This discussion was converted from issue #2123 on October 07, 2024 15:27.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
I want to be able to show my pipeline as a "collapsable" one on viz, currently only namespace pipeline is possible but it requires me to change how I name my catalog, parameters.
Context
Why is this change important to you? How would you use it? How can it benefit other users?
Namespace is a big change to Kedro pipeline structure and I don't necessary want to buy in to the whole modular pipeline structure. It should be possible to do this purely as a viz feature without changing my Kedro pipeline.
Alternative
Use the keys in
pipeline_registry.py
as the "subpipeline" for collapase/expand.Attempt
This is my best attempt to keep dataset/parameters as is, but modular pipeline prevent me to rename intermediate dataset with validation error. How does kedro viz group things into a "namespace"? Is it the
node.name
attribute, if so how dataset and params are associated with it?Beta Was this translation helpful? Give feedback.
All reactions