rich-artist-45699
05/24/2023, 7:57 PMhook = FlyteHook(flyte_conn_id=FLYTE_CONN_ID, project=flyte_project, domain=flyte_domain)
remote = hook.create_flyte_remote()
# workflow = remote.fetch_workflow(flyte_project, flyte_domain, flyte_task)
executions = remote.recent_executions(flyte_project, flyte_domain)
executions_filtered = list(
filter(
lambda e: e.spec.launch_plan.name == flyte_task and e.is_done,
executions,
)
)
if executions_filtered:
execution = executions_filtered[0]
<http://logging.info|logging.info>(f"{execution.id}")
outputs = execution.outputs
<http://logging.info|logging.info>(f"{outputs}")
But filtering of executions is not really convenient and the outputs are empty (however they shouldn’t be so)high-accountant-32689
05/24/2023, 9:34 PMrecent_executions
has a limit
parameter.
2. make sure to call sync on the execution prior to checking its outputs / nodes.rich-artist-45699
05/25/2023, 8:05 AMlimit
- not very useful in my case. It just set the number of recent executions
Is there any better way to filter executions that match a certain workflow/task?
I’ve tried to run execution.flyte_workflow.id == workflow.id
, but flyte_workflow
returns None