flyte icon indicating copy to clipboard operation
flyte copied to clipboard

[BUG] Reference tasks cannot be mapped over

Open samhita-alla opened this issue 2 years ago • 3 comments

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

  1. Clone the flytesnacks repo
  2. Register the decorating tasks example
  3. 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

samhita-alla avatar Apr 05 '23 04:04 samhita-alla

Any updates on this ? Facing the same issue

nhattab303 avatar May 23 '23 12:05 nhattab303

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.

eapolinario avatar May 25 '23 17:05 eapolinario

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! 🙏

github-actions[bot] avatar Feb 20 '24 00:02 github-actions[bot]