acoustic-carpenter-78188
07/12/2023, 9:01 AMNamedTuple
but those are restricted in usage.
Goal: What should the final outcome look like, ideally?
I would like this to work:
@dataclass
@dataclass_json
class Config:
x:int
y:int
z:int
some_unused_additional_config:list[str]
@task
def add(x:int, y:int):
return x+y
@workflow
def do_something(config:Config):
add(config.x, config.y)
Describe alternatives you've considered
Currenlty this is only possible with workarounds. You can:
• Make the workflow dynamic
• Use NamedTuples
only if the configuration object is an output of another workflow. They can't be a task or workflow input.
• Change the add
task signatures to take in the full config object, which means taking in unused parameters.
Propose: Link/Inline OR Additional context
No response
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyte