Allow persisting the expected output in the code (#46)
By allowing specifying the UI outputs in the code, any time user runs `kh export ...`, that outputs in the code will be included in the UI YAML file. Otherwise, any time the user runs `kh export ...`, the output section in the UI YAML file will be reset to the default output.
This commit is contained in:
parent
6e7905cbc0
commit
da6b35f520
|
@ -146,11 +146,14 @@ def export_pipeline_to_config(
|
|||
},
|
||||
}
|
||||
else:
|
||||
outputs = [{"step": ".", "getter": "_get_output", "component": "text"}]
|
||||
if hasattr(pipeline, "_promptui_outputs"):
|
||||
outputs = pipeline._promptui_outputs
|
||||
config_obj = {
|
||||
"ui-type": ui_type,
|
||||
"params": handle_node(pipeline_def),
|
||||
"inputs": handle_input(pipeline),
|
||||
"outputs": [{"step": ".", "getter": "_get_output", "component": "text"}],
|
||||
"outputs": outputs,
|
||||
"logs": {
|
||||
"full_pipeline": {
|
||||
"input": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user