New RunLLM response generated: >>>*# Question* Hi...
# runllm-flyte-trial
a
New RunLLM response generated: >>>*# Question* Hi all, is there a way to support the nested List in a task? For example:
Copy code
@dataclass_json
@dataclass
class InnerDataClass:
    inner_name: str


@dataclass_json
@dataclass
class DataClassTest:
    name: str
    value: str
    inner: List[str]

@task
def create_sweep(
...
    test_list: List[DataClassTest],
...
) -> SweepInputs:
I will get error when launching this workflow:
Copy code
ValueError: Only generic univariate typing.List[T] type is supported.
# Answer Flyte currently does not fully support nested lists within dataclasses. This limitation is documented in several issues and discussions. For instance, according to this GitHub issue, Flyte's type system does not handle nested dataclasses or lists of dataclasses well, leading to type mismatches during workflow compilation. Would you like more detail on potential workarounds or further explanation of the issue? Sources: - GitHub Issue: Can't launch task with nested dataclasses as input - GitHub Issue: Accessing attributes fails on complex types Slack Link https://flyte-org.slack.com/archives/CP2HDHKE1/p1721850706.091839 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.