David Erukhimovich
06/06/2022, 6:38 AMdagster.core.errors.DagsterInvariantViolationError: Attempting to access run_id, but it was not provided when constructing the OutputContext
)
Any idea how to get around it?
Thanks!yuhan
06/06/2022, 5:34 PM+B
which should re-execute B with both A and C.David Erukhimovich
06/06/2022, 6:05 PMyuhan
06/06/2022, 7:00 PMDavid Erukhimovich
06/07/2022, 4:58 AMyuhan
06/07/2022, 6:46 PMDavid Erukhimovich
06/07/2022, 6:48 PMNo previously stored outputs found for source StepOutputHandle(step_key='if_op', output_name='enable_b', mapping_key=None). This is either because you are using an IO Manager that does not depend on run ID, or because all the previous runs have skipped the output in conditional execution.
@op
def before1():
return 1
@op
def before2(arg):
return arg
@op(
out={
"enable_a": Out(is_required=False),
"enable_b": Out(is_required=False)
}
)
def if_op():
yield Output(0, "enable_a")
@op
def a(_enable, arg):
return arg
@op
def b(_enable, arg):
return arg
@job
def test():
arg = before1()
arg = before2(arg)
enable_a, enable_b = if_op()
a(enable_a, arg)
b(enable_b, arg)
yuhan
06/14/2022, 5:49 AMb
’s input wasn’t previously persisted (i.e. a
didn’t yield anything so the re-execution can’t load it)David Erukhimovich
06/14/2022, 5:50 AMyuhan
06/14/2022, 5:52 AMb
to follow the current `a`’s output? meaning when the current a
doesn’t yield anything, b
should skip instead of failing; when a
in the re-execution yields something, b
will run regardless of its previous state?I would expect that re-execution will behave the same as the original execution if nothing has changedi see - yea that makes sense. i think i was mistaken - you are right. this seems to be a bug as you included
a
in the re-execution so b
shouldn’t error.David Erukhimovich
06/14/2022, 5:54 AMenable_a
). b is skipped
re-exeution: before2-> a. b is skippedyuhan
06/14/2022, 5:55 AMDagster Bot
06/14/2022, 5:55 AMDavid Erukhimovich
06/14/2022, 5:55 AMyuhan
06/14/2022, 5:55 AMDavid Erukhimovich
06/14/2022, 5:56 AMyuhan
06/14/2022, 5:59 AMDavid Erukhimovich
06/14/2022, 6:00 AMyuhan
06/14/2022, 6:17 AMb
depends on both before2
and if_op
, so in order to have b
correctly being skipped in re-execution, you’ll need to include if_op
as well. otherwise, in the re-execution, the execution machinery would try to find `if_op`’s output for b
to load, and in your case it failed.
if_op*, before2*
should work in your case.David Erukhimovich
06/14/2022, 6:41 AMyuhan
06/14/2022, 6:44 AMRe-execute
button would reflect whatever you selectedb
’s inputs are, e.g. when the source of the input is in the same run, it would load from the same run; when the source is not being executed, it would try load from the previous run which in your case the output didn’t exist.
but all that being said, i do think the error message is confusing and we should improve that.David Erukhimovich
06/14/2022, 6:49 AMyuhan
06/14/2022, 6:59 AMDavid Erukhimovich
06/14/2022, 7:05 AMyuhan
06/14/2022, 7:10 AM+b
or if_op*, before2*
David Erukhimovich
06/14/2022, 7:23 AM