acoustic-carpenter-78188
10/26/2023, 7:08 PMdef foo(bar: int=1) -> int:
return bar
def wf() -> int:
return foo()
In Flyte, the following workflow (which only adds task/workflow decorators) is not:
@task
def foo(bar: int=1) -> int:
return bar
@workflow
def wf() -> int:
return foo()
The user is confronted with this error message:
flytekit.exceptions.user.FlyteAssertion: Error encountered while executing 'wf':
Input was not specified for: bar of type <FlyteLiteral simple: INTEGER>
Many Flyte users are ML engineers that are not necessarily aware of the following (source):
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. This means that the workflow function body only supports a subset of Python’s semanticsFor these users, the above error message is very confusing and does not give a hint why something that works in python wouldn't work in a flyte workflow. * * * Since I was asked about this particular limitation by several of our platform users, I propose that we improve the error message so that the error explains itself and users are informed about flyte workflows being a DSL, not python. Type Neither of the following but improved error message. ☐ Bug Fix ☐ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☐ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description NA Tracking Issue NA Follow-up issue NA flyteorg/flytekit Codecov: 0.00% of diff hit (target 54.71%) ✅ 29 other checks have passed 29/30 successful checks
acoustic-carpenter-78188
10/26/2023, 7:08 PMacoustic-carpenter-78188
10/27/2023, 9:10 AMacoustic-carpenter-78188
10/30/2023, 6:04 PM