No, you cannot directly "call" a Promise object in a Flyte workflow. In Flyte, a Promise is a placeholder for a value that will be produced by a task or workflow at execution time. You can only pass Promise objects as inputs to other tasks, workflows, or Flyte constructs, but you cannot invoke or access their underlying value directly within the workflow body. Attempting to do so will not yield the actual value and may result in errors or unexpected behavior. This is a core part of Flyte's workflow DSL semantics, as described in the documentation and multiple issues (
see here,
here, and
here).
If you need to operate on the actual value, you must do so inside a task, not in the workflow body. Alternatively, you can use an eager workflow (
@eager
), which allows you to materialize outputs as Python values, but this is a different execution paradigm (
see eager workflows). Would you like more detail or code examples?
Sources:
-
Flyte Fundamentals: Tasks, Workflows, and Launch Plans
-
Flyte User Guide: Workflows
-
Flyte Blog: Meet the Databricks Integration
-
Eager Workflows š 0 button š 0 button š”
Hint: Mention @runllm in the thread for followups.