ancient-wolf-19325
08/07/2024, 6:53 PM@task and @workflow decorators to be in a single file or at the same level in the parent directory. Flyte supports organizing your code into meaningful sets of modules and subpackages, allowing you to segregate functionalities and reuse them better.
You can structure your Flyte project to have multiple directories and files. For example, you can have a common/ directory for shared tasks and separate directories for different projects or workflows. You can then register these directories using the pyflyte register command. Here is an example structure:
src/
__init__.py
proj1/
__init__.py
tasks.py
workflows.py
proj2/
__init__.py
tasks.py
workflows.py
common/
__init__.py
shared_tasks.py
You can register the directories as follows:
pyflyte register src/proj1 src/common
pyflyte register src/proj2 src/common
For more details, refer to the Flyte documentation on registering workflows.
Would you like more details on how to set this up or any specific part of the process?
Sources:
- Flyte Discussion
- Flyte Documentation
Slack Link
https://flyte-org.slack.com/archives/CP2HDHKE1/p1723056761.353739 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.