flyteorg / flyte

Scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks.
https://flyte.org
Apache License 2.0
5.73k stars 649 forks source link

[Core feature] Flytekit should support `unsafe` mode for types #5319

Open kumare3 opened 6 months ago

kumare3 commented 6 months ago

Motivation: Why do you think this is important?

Today for every task and workflow it is necessary for everything to be typed. It should be possible to create tasks that are untyped and unsafe optionally

Goal: What should the final outcome look like, ideally?

@task(unsafe=True)
def foo(x, y: int) -> typing.Any:
   ...

@task
def foo2(y: int):
   ...

@workflow(unsafe=True)
def wf(x, y: int):
   foo(x=x, y=10)
   foo1(y=y)

Describe alternatives you've considered

everything can be marked as typing.Any today, which is but a problem

Propose: Link/Inline OR Additional context

No response

Are you sure this issue hasn't been raised already?

Have you read the Code of Conduct?

kumare3 commented 6 months ago
FlytePickle => FlyteFile[pickle]
FlytePickle = Optional[FlyteFile, Binary].  # Union type
Mecoli1219 commented 5 months ago

take