-
Notifications
You must be signed in to change notification settings - Fork 910
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] Add resume to batch engine #2003
Conversation
SDK CLI Global Config Test Result shimin/resume2 tests 2 ✅ 50s ⏱️ Results for commit 4f81337. ♻️ This comment has been updated with latest results. |
promptflow SDK CLI Azure E2E Test Result shimin/resume 4 files 4 suites 3m 20s ⏱️ Results for commit 4f81337. ♻️ This comment has been updated with latest results. |
SDK CLI Test Result shimin/resume 12 files 12 suites 41m 5s ⏱️ Results for commit 4f81337. ♻️ This comment has been updated with latest results. |
Executor Unit Test Result shimin/resume735 tests 735 ✅ 45s ⏱️ Results for commit 4f81337. ♻️ This comment has been updated with latest results. |
Executor E2E Test Result shimin/resume198 tests 196 ✅ 4m 12s ⏱️ Results for commit 4f81337. ♻️ This comment has been updated with latest results. |
ebf0e07
to
b482ba8
Compare
8b7b54b
to
c543b72
Compare
Description
This pull request adds the resume function for batch run in batch engine.
The most important changes are:
Addition of new feature:
src/promptflow/promptflow/batch/_batch_engine.py
: Added logic to handle resuming from a previous run. In resume run, the previous completed and failed lines are dropped and the other lines are processed. Added_copy_previous_run_result
to load previous flow run output from output.jsonl, copy image files to output_dir, and extract aggregation inputs for aggregation node.Addition of new utility functions:
src/promptflow/promptflow/_utils/utils.py
: Addedload_list_from_jsonl
function to load a list from a jsonl file andcopy_file_except
function to copy all files from one directory to another excluding a specific file. [1] [2]Rearrange functions:
src/promptflow/promptflow/executor/flow_executor.py
: Moved_extract_aggregation_inputs
and_extract_aggregation_input
functions to utils to be used in more general cases.Changes to test files:
src/promptflow/tests/executor/e2etests/test_batch_engine.py
: Added e2etest to resume batch run and resume batch run with aggregation.All Promptflow Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines