[BUG] Reference tasks cannot be mapped over
Describe the bug
When a reference task is mapped over in a workflow, it's resulting in Failed with Unknown Exception <class 'AttributeError'> Reason: 'ReferenceTask' object has no attribute '_task_function' error.
Expected behavior
This operation shouldn't result in any errors.
Additional context to reproduce
- Clone the flytesnacks repo
- Register the decorating tasks example
- Trigger the following code by specifying the registered version of task
t1
from flytekit import map_task, reference_task, workflow
@reference_task(
project="flytesnacks",
domain="development",
name="core.flyte_basics.decorating_tasks.t1",
version="<version>",
)
def t1(x: int) -> int:
...
@workflow
def wf(x: list[int] = [3, 2]):
return map_task(t1)(x=x)
Screenshots
No response
Are you sure this issue hasn't been raised already?
- [X] Yes
Have you read the Code of Conduct?
- [X] Yes
Any updates on this ? Facing the same issue
I did an initial investigation for this and unfortunately reached the conclusion that supporting reference tasks in map tasks would take a non-negligible amount of work.
Hello 👋, this issue has been inactive for over 9 months. To help maintain a clean and focused backlog, we'll be marking this issue as stale and will engage on it to decide if it is still applicable. Thank you for your contribution and understanding! 🙏