cuddly-jelly-27016
08/09/2025, 1:42 AMmap_task within a task function body
@task
def t1():
map_task(...)(...)
• When a user tries to define a map_task at the module-level scope
@map_task
@task
def t1(): ...
or
@task
def t1(): ...
my_map_task = map_task()(t1)
### Goal: What should the final outcome look like, ideally?
The error should make it clear that `map_task`s can only be defined in workflow function bodies.
### Describe alternatives you've considered
NA
### 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/flytecuddly-jelly-27016
08/09/2025, 1:42 AM