Hi all, I'm trying to use a map_task for a task th...
# flyte-support
b
Hi all, I'm trying to use a map_task for a task that takes an attribute of a dataclass as an input, but the workflow is stuck in a loop. Given a dataclass A with an attribute "a" of type str, and an output of a map_task of type List[A], is there a way to access the dataclass attribute using list comprehension(or something similar to retrieve A.a), so I will have an object of type List[str]? Meaning- is there a way to iterate over an output of type "list"?
g
What's the type of
a
?
b
@gentle-tomato-480 str
g
Sure.
[ A_obj.a for A_obj in A_list]
should get you your list of `a`s, right?
Where
A_list
is some
List[A]
b
@gentle-tomato-480 Seems to be stuck in a loop in my case.. I figured it isn't supported
g
Could you post a snippet of your code?