https://flyte.org logo
#ask-the-community
Title
# ask-the-community
n

Nizar Hattab

07/09/2023, 10:16 AM
Hi ! I am trying to use reference_task with map_task as its not supported with dynamic . but i get this error: map_task error:
Copy code
Failed with Unknown Exception <class 'AttributeError'> Reason: Error encountered while executing 'wf':
  'ReferenceTask' object has no attribute '_task_function'
dynamic error
Copy code
[3/3] currentAttempt done. Last Error: SYSTEM::Traceback (most recent call last):

      File "/opt/venv/lib/python3.9/site-packages/flytekit/exceptions/scopes.py", line 165, in system_entry_point
        return wrapped(*args, **kwargs)
      File "/opt/venv/lib/python3.9/site-packages/flytekit/core/base_task.py", line 539, in dispatch_execute
        raise e
      File "/opt/venv/lib/python3.9/site-packages/flytekit/core/base_task.py", line 536, in dispatch_execute
        native_outputs = self.execute(**native_inputs)
      File "/opt/venv/lib/python3.9/site-packages/flytekit/core/python_function_task.py", line 166, in execute
        return self.dynamic_execute(self._task_function, **kwargs)
      File "/opt/venv/lib/python3.9/site-packages/flytekit/core/python_function_task.py", line 301, in dynamic_execute
        return self.compile_into_workflow(ctx, task_function, **kwargs)
      File "/opt/venv/lib/python3.9/site-packages/flytekit/core/python_function_task.py", line 227, in compile_into_workflow
        raise Exception("Reference tasks are currently unsupported within dynamic tasks")

Message:

    Reference tasks are currently unsupported within dynamic tasks

SYSTEM ERROR! Contact platform administrators.
Flytekit 1.7.0 is it not supported ?
s

Samhita Alla

07/10/2023, 4:21 AM
You should be able to reference map tasks. Is this something we need to support? @Eduardo Apolinario (eapolinario) @Kevin Su
n

Nizar Hattab

07/10/2023, 12:21 PM
any answers?
k

Kevin Su

07/10/2023, 1:46 PM
we don’t support reference task in the dynamic for now, because flytekit needs credentials (client id and secret) to connect to the flyteadmin. However, when you running the task in the pod, there is no credentials.
n

Nizar Hattab

07/10/2023, 2:23 PM
Thanks! Any idea why it also fails to run reference task in a map task ?
Copy code
Failed with Unknown Exception <class 'AttributeError'> Reason: Error encountered while executing 'wf':
  'ReferenceTask' object has no attribute '_task_function
k

Kevin Su

07/11/2023, 6:25 AM
you want to map over reference task? it’s also not supported right now. https://github.com/flyteorg/flyte/issues/3573
2 Views