cuddly-jelly-27016
08/29/2023, 10:38 AMfrom flytekit import workflow, dynamic, task
@task
def my_task():
print("foo")
@dynamic
def outer():
my_task()
@workflow
def workflow(
):
outer()
if __name__ == "__main__":
workflow()
prints:
{"asctime": "2023-08-29 11:57:57,824", "name": "flytekit", "levelname": "ERROR", "message": "You are not supposed to nest @Task/@Workflow inside a @Task!"}
foo
Expected behavior
The warning should not be print if a task is called within a dynamic node.
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteacoustic-carpenter-78188
08/31/2023, 11:03 PM