You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flytekit doesn't support positional args for calling tasks in a workflow, eg:
from dataclasses import dataclass
from dataclasses_json import dataclass_json
from flytekit import task, workflow
@dataclass_json
@dataclass
class dc:
its_a_kind_of:str
@task
def generate_reference_data() -> dc:
return dc(its_a_kind_of="MAGIC")
@task
def process_reference_data(data: dc) -> str:
return data.its_a_kind_of
@workflow
def main() -> str:
reference_data = generate_reference_data()
# Flyte takes keyword args here only
return process_reference_data(reference_data)
if __name__ == "__main__":
print(main())
Will error with
flytekit.common.exceptions.user.FlyteAssertion: When calling tasks, only keyword args are supported. Aborting execution as detected 1 positional args (Promise(node:n0.o0),)
Motivation: Why do you think this is important?
Supporting positional args would reduce friction when converting existing Python scripts to Flyte workflows.
The text was updated successfully, but these errors were encountered:
Flytekit doesn't support positional args for calling tasks in a workflow, eg:
Will error with
Motivation: Why do you think this is important?
Supporting positional args would reduce friction when converting existing Python scripts to Flyte workflows.
The text was updated successfully, but these errors were encountered: