dh
03/18/2021, 7:53 PMflow.register
context: we want to create a dynamically defined flow (e.g. Flow(result=S3Result(location=f'bucket/{<http://args.my|args.my>_result_key}', ...)
for flow reuse. To parse user-pass args, we instantiate the Flow behind __main__
. Now we noticed we can’t use prefect cli to register because it can’t pass extra user args. Alternatively, we are considering flow.register
and wonder if there would be any risks we should be aware of.
[1]: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/cli/register.py#L70Jim Crist-Harif
03/18/2021, 7:54 PMdh
03/18/2021, 7:58 PMJim Crist-Harif
03/18/2021, 7:59 PMdh
03/18/2021, 8:03 PMJim Crist-Harif
03/18/2021, 9:07 PMwith Flow("example") as flow:
if some_build_time_user_config_flag:
x = some_task_a()
else:
x = some_task_b()
Ranu Goldan
03/29/2021, 3:12 AMdh
04/02/2021, 10:22 PMRanu Goldan
04/07/2021, 1:43 AM