Open kumare3 opened 11 months ago
I don't think this is hacktoberfest- this one maybe too complicated?
let's discuss the design for this feature, it can easily become confusing between this and eager workflows what the "right way" of doing things is, might even be worthy of an RFC. The basic idea of this issue is supported with @eager(..., local_entrypoint=True)
, see here.
IMO @hybrid
would be less confusing naming here... or whatever name we choose, it should match the pyflyte run
flag that we decide on.
this could be called mixed-mode
too
Motivation: Why do you think this is important?
There are times when it would be nice to execute some tasks remotely, while keeping other tasks local. With Flyte Agents we have already enabled this. Flyte agents have the capability of calling external services as long as "secrets" are configured correctly. I opine that this should be available for all task types. With Single task execution and Flyte remote this would be possible. This issue also proposes a UX for the same.
Goal: What should the final outcome look like, ideally?
A user could use
pyflyte run --hybrid module.py my_wf
and it should send certain tasks to the Flyte remote instance. If--hybrid
is not specified then all tasks will be run locally if--remote
is specified, then all tasks with workflow will be run remotely.This will also lend well into
@eager
workflows as they become more rampant. This relates to this issue https://github.com/flyteorg/flytekit/pull/1833IMO the solution proposed here
--hybrid
could be applied to eager as well! cc @cosmicBboyDescribe alternatives you've considered
NA
Propose: Link/Inline OR Additional context
Recommendation introduce a new decorator
@remote
which can be added to any taskNow if we invoke
pyflyte run wf.py wf
-> no deviation from current behaviorpyflyte run --remote wf.py wf
-> no deviation from current behaviorpyflyte run --hybrid wf.py wf
-> only task marked with@remote
decorator is invoked remotely. in the above examplefoo1
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?