LP
02/17/2023, 7:13 PMdef op_factory(name):
@op(name=name):
def common_step():
pass
return common_step
def op_factory_v2(name):
@op(name=name):
def common_step_1():
pass
return common_step_1
@graph(out={"step_1": GraphOut(),
"step_2": GraphOut()})
def graph_1(): # forecasting_pipeline
step_output_dict = {}
for i in range(2):
step_output_dict[f"step_i}"] = op_factory(i)()
return {"step_1": step_output_dict["forecasting_step_hierarchy_1"],
"step_2": step_output_dict["forecasting_step_hierarchy_2"]}
@graph
def graph_2(step_1, step_2):
op_factory_v2("combine_graph")(step_1, step_2)
@noodle_workflow()
def ml_workflow():
step_1, step_2 = graph_1()
graph_2(step_1, step_2)
jordan
02/17/2023, 7:14 PMLP
02/17/2023, 7:16 PM