Hi all, loving Flyte so far and I want to learn mo...
# ask-the-community
Hi all, loving Flyte so far and I want to learn more. I have a task where I want to return a typing.List[int]. Before returning the variable, it's type is of a List[int], but when I receive it in the task that called it, it is a Promise. What I want to know is: 1. Why is it being returned as a Promise? 2. How do I convert it from a Promise into a typing.List[int] or whatever form I need? Thanks, hope someone can help my noob questions!
Within the promise it looks like
Resolved=(output1=<FlyteLiteral collection { literals { scalar { primitive { integer: 15 } } } . . .
Everything that you pass into a workflow is a promise. Only inside a task will it be materialized into a list. This is a distributed system; a workflow is not executed as normal Python code.
Although Flyte workflow syntax looks like Python code, it’s actually a domain-specific language (DSL) for building execution graphs where tasks – and other workflows – serve as the building blocks.