Is there a way to define non-data dependencies bet...
# ask-community
f
Is there a way to define non-data dependencies between sub-graphs when using the new API? I made an attempt with a structure like this, based on the old APIs order-based dependencies between solids.
Copy code
@graph
def g1():
    x = op1()
    y = op2(x)
@graph(input_defs=[InputDefiniton("start", Nothing)])
Copy code
def g2():
    op3()
Copy code
@graph
def combined():
    g1_res = g1()
    g2(g1_res)
However, this resulted in a DagsterInvalidDefinitionError:
@graph 'g2' decorated function does not have parameter(s) 'start' which are in solid's input_defs. Solid functions should only have keyword arguments that mstche input names and, if system information is required, a first parameter named 'context'.
Is there some other way to do this, is it not supported or is it just a bug in the experimental API? I'm currently running dagster 0.12.6
a
the error message is really out of whack here which can be balmd on the experimental nature You have to map inputs through
graph
layers all the way to
ops
, including
Nothing
s. So you would have to thread the
start
through all
graph
layers to all the
ops
you want to block on. This is not the most ergonomic, but should allow you to solve your problem. You can chime in on https://github.com/dagster-io/dagster/issues/4274 with thoughts on what you wish you could do
@Dagster Bot issue [jog] @graph bad def time error message for inputs
d
f
Then I know what I can do for now. I will checkout the ticket about Nothing you referenced as well. Thanks for the help 🙂