<#1559 Python run multiple files> Pull request ope...
# flyte-github
a
#1559 Python run multiple files Pull request opened by pingsutw TL;DR Add support uploading multiple files if needed when using pyflyte run. Consider the following example, we should copy
main.py
,
t1.py
,
t2.py
to the destination.
compress_scripts
will do 1. copy the script to destination. 2. import module (script). 3. Iterate all the module in this script. 4. recursively run
compress_scripts()
if import flyte entity from other file. Source:
Copy code
├── __init__.py
├── other.py
├── wf1
│   ├── __init__.py
│   ├── main.py # import t1
│   └── t1.py # import t2
└── wf2
    ├── __init__.py
    └── t2.py
    └── t3.py
    └── t4.py
Destination:
Copy code
├── __init__.py
├── wf1
│   ├── __init__.py
│   ├── main.py
│   └── t1.py
└── wf2
    ├── __init__.py
    └── t2.py
All of the below commands work for me
Copy code
pyflyte run --remote root/wf1/main.py wf
pyflyte run --remote wf1/main.py wf
pyflyte run --remote main.py wf
Type ☐ Bug Fix ☑︎ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☑︎ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description

image

Tracking Issue NA Follow-up issue NA flyteorg/flytekit All checks have passed 30/30 successful checks