diff --git a/metaflow/plugins/catch_decorator.py b/metaflow/plugins/catch_decorator.py index c59d8b27c56..4adfca00972 100644 --- a/metaflow/plugins/catch_decorator.py +++ b/metaflow/plugins/catch_decorator.py @@ -87,9 +87,10 @@ def task_exception( # If this task is a UBF control task, it will return itself as the singleton # list of tasks. - flow._control_mapper_tasks = [ - "/".join((current.run_id, current.step_name, current.task_id)) - ] + if hasattr(flow, "_parallel_ubf_iter"): + flow._control_mapper_tasks = [ + "/".join((current.run_id, current.step_name, current.task_id)) + ] # store the exception picklable = MetaflowExceptionWrapper(exception) flow._catch_exception = picklable