https://dagster.io/ logo
#dagster-support
Title
# dagster-support
a

antonl

05/12/2022, 12:28 PM
Hi all, Is there a way to get “eager” execution of graphs? I know it's possible to execute ops by calling them outside of graph-decorated functions. What I'm looking for is a way to get op calls inside graphs to return Outputs rather than output handles. This would be handy for debugging nested graphs, especially when one calls the same ops over and over again.
s

Samuel Stütz

05/12/2022, 1:19 PM
what would be the difference to just doing a
result = <http://my_graph.to|my_graph.to>_job('test_job'_)
?
y

yuhan

05/12/2022, 6:58 PM
To debug a nested graph, you can subset the job/graph to narrow down to only execute the subgraph:
Copy code
@job
def supergraph():
    add_one(subgraph())

supergraph.execute_in_process(op_selection="subgraph")
a

antonl

05/12/2022, 7:10 PM
Sure, that makes sense, but that only solves part of the problem. I'm specifically interested in workflows that allow one to inspect intermediate outputs. The @graph decorator executes the wrapped function upon import of that function to define the graph. When I execute it using in process executor, the wrapped function is no longer used. When running under a debugger, I'd like to be able to actually “ignore” the @op and @graph decorators, so that I work with values rather than handles. My intuition is that this can be accomplished with a “@debug/eager” decorator that skips the dag construction and just works with values. My question is, are there easier ways to inspect intermediate values? The only way I came up with is by using an io_manager that just dumps everything to disk and load it up later.