Shane Keller
03/05/2024, 11:46 PMScout
03/05/2024, 11:46 PMins
parameter when decorating a function with @graph
. The ins
parameter is a dictionary that maps input names to GraphIn
instances, which represent the inputs to the graph. Here's an example from the documentation on how to define a graph with multiple inputs: python from dagster import graph, GraphIn @graph( ins={"input1": GraphIn(), "input2": GraphIn()}, ) def my_graph(input1, input2): # Your graph logic here, using input1 and input2 pass
In this example, my_graph
is a graph with two inputs, input1
and input2
. The GraphIn
instances do not need to be explicitly configured if you are simply passing inputs through; they act as placeholders for the inputs that the graph expects. When you use this graph within a job or another graph, you will need to provide values for these inputs.