acoustic-carpenter-78188
03/17/2023, 9:08 PMfrom flytekit import workflow, task
class MyClass:
@task
def t1(self):
return 'hello world'
@workflow
def wf():
MyClass().t1()
there will be lots of work for us as we need to convert all the classes to functions so that these functions can be decorated as tasks. I believe this feature is important for the following reasons:
• Encourage people to build more Flyte pipelines for the existing projects
• The code will be more organized and concise
Goal: What should the final outcome look like, ideally?
In the end, I hope Flyte can support something like the following
from flytekit import workflow, task
class MyClass:
@task
def t1(self):
return 'hello world'
@workflow
def wf():
MyClass().t1()
That is to define tasks within classes
Describe alternatives you've considered
I don't think I have any alternative for this issue.
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