-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature][Executor] Refine the image startup scripts to support customized executor image #2762
Conversation
promptflow-core test result0 tests 0 ✅ 0s ⏱️ Results for commit 44c361c. ♻️ This comment has been updated with latest results. |
SDK CLI Global Config Test Result devs/peiwen/add_image_entrypoint3 tests 3 ✅ 1m 25s ⏱️ Results for commit 44c361c. ♻️ This comment has been updated with latest results. |
promptflow SDK CLI Azure E2E Test Result devs/peiwen/add_image_entrypoint 4 files 4 suites 4m 46s ⏱️ Results for commit 44c361c. ♻️ This comment has been updated with latest results. |
Executor Unit Test Result devs/peiwen/add_image_entrypoint778 tests 778 ✅ 3m 41s ⏱️ Results for commit 44c361c. ♻️ This comment has been updated with latest results. |
Executor E2E Test Result devs/peiwen/add_image_entrypoint238 tests 236 ✅ 11m 16s ⏱️ Results for commit 44c361c. ♻️ This comment has been updated with latest results. |
SDK CLI Test Result devs/peiwen/add_image_entrypoint 4 files 4 suites 45m 18s ⏱️ Results for commit 44c361c. ♻️ This comment has been updated with latest results. |
…/microsoft/promptflow into devs/peiwen/add_image_entrypoint
Description
Background
To facilitate customers in choosing their desired Python version within the executor image (default version: 3.9), we will offer a simple and efficient solution that allows users to quickly build custom images.
Implementation
uvicorn
andgunicorn
as extra dependencies in promptflow-core.serving
/compute
) detection within the entry point to start the app accordingly.Usage
Once the changes from this PR are released to the public version of promptflow, customers can easily build their desired Python version of the executor image using the Dockerfile below, and then add it to the flow yaml to create an automatic runtime for use.
Test Links
PR Changes Summary
This pull request primarily updates the
src/promptflow-core
package to include a newexecution_app.py
module and modifies thepyproject.toml
file to include new dependencies and scripts. Theexecution_app.py
module includes a newRunMode
class, functions to get the number of processes based on the CPU core number, check if a given model directory contains certain files, get the run mode, and start the server based on the run mode. Thepyproject.toml
file has been updated to includeuvicorn
andgunicorn
as dependencies and a new script to start the server.Here are the most important changes:
src/promptflow-core/promptflow/execution_app.py
: A new module that includes aRunMode
class, functions to get the process number based on the CPU core number, check if a given model directory contains certain files, get the run mode, and start the server based on the run mode.Updates to
pyproject.toml
:src/promptflow-core/pyproject.toml
: Addeduvicorn
andgunicorn
as dependencies for the executor service and AzureML serving, respectively.src/promptflow-core/pyproject.toml
: Added a new script,pfapp
, to start the server.All Promptflow Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines