ancient-wolf-19325
08/07/2024, 11:22 AMpyflyte run --remote workflow.py workflowname --inputparam value to start up a remote flyte workflow. I have in a folder my workflow.py which imports data.py which in turns imports a custom_types.py file.
All these 3 files lie in the same directory. However, only the data import works, the following custom_types import is failing, and I guess the python script is not even available on flyte.
--copy-all resolved this issue, but is there some documentation or output flag, or in the webview some data i can inspect to find out which files got uploaded/copied? I want to understand why data.py is avaible on flyte, but not the other one (custom_types.py is even also imported from workflow.py directly). I was developing and it was not added to git initially, so I also did that but did not help, is there perhaps also some caching of registered files going on? Seems very intransparent to me right now.
Any help is greatly appreciated 🙂
# Answer
The issue you're encountering is likely due to the way pyflyte run --remote handles file uploads. By default, it only uploads the specified workflow file and not the entire directory. The --copy-all flag resolves this by copying all files in the directory, but it can be overkill if you only need specific files.
Currently, there isn't a direct flag or detailed output in pyflyte run to inspect which files got uploaded. However, you can use the --copy flag to specify individual files or directories to include during the fast registration process. This can help you control which files are uploaded without copying everything.
pyflyte run --remote workflow.py workflowname --inputparam value --copy data.py --copy custom_types.py
Regarding caching, Flyte does not cache registered files in a way that would affect your current issue. The problem is more likely related to the file inclusion during the registration process.
For more detailed information, you can refer to the Flyte documentation on fast registration.
Would you like more details on how to manage file dependencies in Flyte?
Sources:
- Flyte documentation on fast registration
- Flyte GitHub Issue - UX improvement: `pyflyte run` includes imported local modules in the target workflow file
- Flyte GitHub Issue - UX improvement: add --copy flag to pyflyte run for more targeted file copying during fast registration
Slack Link
https://flyte-org.slack.com/archives/CP2HDHKE1/p1723029727.097119 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.