Open dacort opened 1 year ago
Any updates?
Not as of yet - thanks for the bump, might try to take a look this week. Contributions also welcome.
@kirillklimenko I'd love to have more details about your use-case and/or expectations.
If I went with option 1 (truncate the folder when constructing the entrypoint), would that break anything for you like relative imports?
@dacort
I ran into an error when I passed a relative path to an entrypoint and it wasn't found for example:
--entrypoint src/entrypoints/main.py
--s3-code-uri s3://${S3_BUCKET}/projects/
Yep, makes sense - does your main.py
reference modules relative to src/entrypoints
?
For example, given a structure like this:
.
└── src
├── entrypoints
│ ├── main.py
│ └── vendor
│ └── example.py
└── utils
└── udf.py
5 directories, 3 files
I could image if main.py
were moved outside of the src/entrypoints
folder and tried to use from vendor.example import Vendor
it would fail.
from utils.udf import SomeFunction
would likely still work as the Python project would get get packaged up properly.
@dacort
Yes, main.py has dependencies on the files inside the package.
If I move main.py from the entrypoints folder to the root and specify it as -- entrypoint main.py
, then everything works, but if it is inside the package (the src folder), it does not work --entrypoint src/entrypoints/main.py
.
I have multiple entrypoints in the entrypoints folder, so it doesn't make sense for me to put each one at the root of the project.
Ok, thank you, that's helpful!
If the entrypoint file is in a subfolder locally, it attempts to use that subfolder in constructing the entrypoint path on S3.
We should either: