Commit 9aedbc01 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[helpers] Add output parsing for loop

parent 4eb0c5a6
......@@ -82,6 +82,12 @@ def parse_inputs(inputs):
return data
def parse_outputs(outputs):
return dict(
[(k, {"channel": v["channel"], "path": v["path"]}) for k, v in outputs.items()]
)
def convert_loop_to_container(config):
data = {
"algorithm": config["algorithm"],
......@@ -91,7 +97,7 @@ def convert_loop_to_container(config):
}
data["inputs"] = parse_inputs(config["inputs"])
data["outputs"] = parse_outputs(config["outputs"])
return data
......@@ -109,12 +115,7 @@ def convert_experiment_configuration_to_container(config):
data["inputs"] = parse_inputs(config["inputs"])
if "outputs" in config:
data["outputs"] = dict(
[
(k, {"channel": v["channel"], "path": v["path"]})
for k, v in config["outputs"].items()
]
)
data["outputs"] = parse_outputs(config["outputs"])
else:
data["result"] = {
"channel": config["channel"],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment