我一直在尝试运行参数化和连接的流。
基本上,有一个任务返回一个参数字典 ( make_poem
),以及一个基于参数 ( declaim_poem
) 打印某些内容的流程。还有以下父流程:
flow_run = StartFlowRun(flow_name="declaim_flow", project_name=project_name)
with Flow("param_flow") as flow:
flow_run.set_upstream(task(make_poem), key="parameters")
这比跑了,结果如下:
[2021-08-01 17:04:05+0200] INFO - prefect.FlowRunner | Beginning Flow run for 'param_flow'
[2021-08-01 17:04:05+0200] INFO - prefect.FlowRunner | Beginning Flow run for 'param_flow'
[2021-08-01 17:04:05+0200] INFO - prefect.FlowRunner | Beginning Flow run for 'param_flow'
[2021-08-01 17:04:05+0200] INFO - prefect.FlowRunner | Beginning Flow run for 'param_flow'
[2021-08-01 17:04:05+0200] INFO - prefect.TaskRunner | Task 'make_poem': Starting task run...
[2021-08-01 17:04:05+0200] INFO - prefect.TaskRunner | Task 'make_poem': Finished task run for task with final state: 'Success'
[2021-08-01 17:04:05+0200] INFO - prefect.TaskRunner | Task 'Flow declaim_flow': Starting task run...
[2021-08-01 17:04:06+0200] INFO - prefect.Flow declaim_flow | Flow Run: < cloud link >
[2021-08-01 17:04:06+0200] INFO - prefect.TaskRunner | Task 'Flow declaim_flow': Finished task run for task with final state: 'Success'
[2021-08-01 17:04:06+0200] INFO - prefect.FlowRunner | Flow run SUCCESS: all reference tasks succeeded
即使这是一个成功的结果,我也无法从declaim_poem
(如暗示的那样,一首诗)中得到预期的输出以在屏幕上打印出来。根据此页面,我正在使用在declaim_poem
任务内部实例化的记录器,而不是流。
在提供的 Prefect Cloud 链接中,我也找不到这首诗,只有来自所有流程的所有任务的成功结果。
关于我做错了什么的任何想法?