Zach
05/16/2022, 8:00 PMoutput_defs
argument of the op generating the DynamicOutputs - this section is a bit ambiguous but maybe seems related, although I'm suspecting the multiple_dynamic_values
op used in the example is supposed to be an op that operates on DynamicOutputs, not one that yields themjamie
05/16/2022, 8:05 PMZach
05/16/2022, 8:05 PM@op(
name="args_generator",
config_schema={"chroms": Field([str])},
out={'out1': DynamicOut(str),
'out2': DynamicOut(str)},
)
def generate_args(context: OpExecutionContext):
for c in context.op_config["chroms"]:
yield DynamicOutput(c, mapping_key=c), DynamicOutput(c, mapping_key=f'{c}_1')
AttributeError: '_args_generator_outputs' object has no attribute 'map'
on compilationjamie
05/16/2022, 8:07 PMgenerate_args
is being called in a graph/job?Zach
05/16/2022, 8:08 PM@graph()
def example_io_graph():
generate_args().map(do_processing)
jamie
05/16/2022, 8:11 PMZach
05/16/2022, 8:14 PM@graph(name="example_io_dnax")
def example_io_graph():
arg1, arg2 = generate_args()
arg1.map(do_processing)
arg2.map(do_processing)
so maybe if I need multiple values going to do_processing
they should just be passed as a dictionary or tuple... I guess a refinement of the question would be whether arg1 and arg2 in the example above can be fed to do_processing
together, or if by returning two DynamicOutputs you basically are creating two separate downstream branches in the dagjamie
05/16/2022, 8:18 PMZach
05/16/2022, 8:19 PM