Do people have a design pattern they like specifyi...
# ask-the-community
Do people have a design pattern they like specifying task variants at execution time in a dynamic workflow? As a concrete example, say you have an evaluation workflow and a number of metric functions you want to run within the workflow, specified by the user at execution time. You have several options: You could handle the mapping from dynamic workflow inputs to logic outside of flyte (i.e. pass in a function string name and do a dynamic import within the task, or define an enum with all the task functions, and pass that in to the dynamic workflow) but this feels like a bit of a hat-on-a-hat given that a big part of flyte's functionality is a "logic" registry. I think the other option is passing in a task function directly, and serializing via the key information of the task (name, domain, project, version), then using
to deserialize within the dynamic workflow. Does this make sense? I would do this by writing a custom
for a
but I'm wondering if someone has already been down this road and has simpler suggestions?