wide-lion-54536
12/15/2023, 5:59 PMmap_task
(e.g., if the download task fails permanently with 404) and I’m starting to wonder if this is the wrong design approach for this kind of workflow.
I’ve built a small test using @dynamic
for fanout instead of map_task
but I note that even if I set the parent workflow’s failure_policy
to flytekit.WorkflowFailurePolicy.FAIL_AFTER_EXECUTABLE_NODES_COMPLETE
the fanned-out tasks all complete, but the @dynamic
workflow still fails and doesn’t return partial results.
Curious how others in the community approach these kind of jobs with flyte?tall-lock-23197
min_success_ratio
in your map task? it determines the minimum fraction of total jobs that must complete successfully before terminating the map task and marking it as successful.wide-lion-54536
12/18/2023, 6:37 PMmin_success_ratio
will terminate the map_task once the minimum ratio of successful tasks is reached. Am I misreading?
• min_success_ratio (float) – If specified, this determines the minimum fraction of total jobs which can complete successfully before terminating this task and marking it successful.What I think I want is for
map_task
to run the mappable task for all of the inputs, but only fail the overall task if some threshold of mapped inputs led to an error.wide-lion-54536
12/18/2023, 7:33 PMmin_success_ratio
appears to do what I’m looking for. Thanks! 🎉wide-lion-54536
12/18/2023, 7:55 PMcore.map_task
and models.ArrayJob
are pretty explicit that map_task
will stop and compute results once the number of successful mapped tasks satisfies min_success_ratio
or min_successes
but that’s not the behavior I’m seeing.
map_task.py:57
:param min_success_ratio: If specified, this determines the minimum fraction of total jobs which must complete
successfully before terminating this task and marking it unsuccessful
ArrayJob.py:18
:param int min_successes: An absolute number of the minimum number of successful completions of subtasks. As
soon as this criteria is met, the array job will be marked as successful and outputs will be computed.
tall-lock-23197
user
12/19/2023, 7:28 AMtall-lock-23197