New RunLLM response generated: >>>*# Question* Hi...
# runllm-flyte-trial
j
New RunLLM response generated: >>>*# Question* Hi all, 2 questions: 1. When running a workflow locally, is there a way to run tasks in parallel (for example in a map_task) or all tasks essentially have to be ran in sequence? It would be very valuable to use all the available cores. 2. When using a dataclass as a task input, is it possible to type hint a generic type e.g BaseDataclass, and then pass a class that inherits from it e.g AdvancedDataclass? I'm encountering some issues with that # Answer 1. Parallel Execution in Local Workflows: When running workflows locally, tasks in a
map_task
can be executed in parallel, leveraging all available cores. However, this parallelism is only fully realized when running on a remote Flyte deployment. Locally, it may appear serial due to the local executor's limitations (source). 2. Generic Type Hinting with Dataclasses: The data sources do not explicitly mention support for using a generic type hint with dataclasses in Flyte tasks. If you're encountering issues, it might be due to Flyte's type system not fully supporting this feature. Would you like more detail on either of these topics? Sources: - Flyte Discussion on Dynamic and Map Tasks Slack Link https://flyte.slack.com/archives/CP2HDHKE1/p1732431303.895879 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.