Hi All, is there a way I can return multiple graph...
# deployment-kubernetes
l
Hi All, is there a way I can return multiple graphs output for downstream one graph ? Example as below. Basically, I want to combine output of 2 or more graph and send output back to 1 single graph.
Copy code
def 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)
j
I think #dagster-support might be better able to answer this question since it has more to do with the API than with K8s - can you try reposting there?
👍 1
l
Done, Thank you @jordan