creamy-stone-99746
02/26/2024, 5:50 PMfast-vr-44972
02/27/2024, 7:05 AMcurrent you can fetch it. You can set it inside the task and then use it in join steps.
https://docs.metaflow.org/api/currentcreamy-stone-99746
02/27/2024, 5:35 PMcreamy-stone-99746
02/27/2024, 5:36 PMfor inp in inputs:
if inp.slide_failed:
print(f"Failed to process {inp.input}.")
print(inp.slide_failed)
self.failed_slides.append(inp.input)
continue
I'd like to print out or know the task_id that the inp represents.fast-vr-44972
02/27/2024, 6:00 PMdef called_by_foreach(self):
try:
# You can define some dataclass also for task_status
self.task_status = dict(task_id=current.task_id, status="SUCCESS", err=None)
except Exception as e:
# maybe add traceback or error?
self.task_status = dict(task_id=current.task_id, status="FAILED", err=str(e))
self.next(self.join)
def join(self, inputs):
tasks = [input.task_status for input in inputs]
# report failed task?
for task_status in tasks:
# report failing stuff?creamy-stone-99746
02/27/2024, 8:04 PMsquare-wire-39606
02/28/2024, 6:47 PM