Skip to content
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

Leverage async batch run for first async-enabled evaluator - FluencyEvaluator #3542

Merged
merged 13 commits into from
Jul 17, 2024

Conversation

ninghu
Copy link
Member

@ninghu ninghu commented Jul 11, 2024

Description

This PR aims to improve the performance of the evaluate API by leveraging async batch run to eliminate the overhead associated with using multiple processes. The key changes include:

  • Converting the FluencyEvaluator to an async-based implementation.
  • Plumbing work in the BatchEngine to enable async batch runs.

For more details, please check the "Run Evaluators Asynchronously" section in this document.

Results:

  • Evaluation with 1 evaluator and 1 row used to take 16 seconds. Now, it takes only 2 seconds, about 87% improve.
  • The result is very close to a pure thread pool implementation, but with async batch run, we also get proper timeout handling.

All Promptflow Contribution checklist:

  • The pull request does not introduce [breaking changes].
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: suggested workflow.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copy link

github-actions bot commented Jul 11, 2024

promptflow SDK CLI Azure E2E Test Result users/ninhu/async_evaluators

  4 files    4 suites   4m 17s ⏱️
244 tests 204 ✅  40 💤 0 ❌
976 runs  816 ✅ 160 💤 0 ❌

Results for commit 38b77b3.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 11, 2024

SDK CLI Global Config Test Result users/ninhu/async_evaluators

6 tests   6 ✅  1m 24s ⏱️
1 suites  0 💤
1 files    0 ❌

Results for commit 38b77b3.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 11, 2024

Executor Unit Test Result users/ninhu/async_evaluators

798 tests   798 ✅  3m 46s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 38b77b3.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 11, 2024

Executor E2E Test Result users/ninhu/async_evaluators

246 tests   240 ✅  5m 5s ⏱️
  1 suites    6 💤
  1 files      0 ❌

Results for commit 38b77b3.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 11, 2024

SDK CLI Test Result users/ninhu/async_evaluators

    4 files      4 suites   1h 6m 43s ⏱️
  786 tests   763 ✅ 23 💤 0 ❌
3 144 runs  3 052 ✅ 92 💤 0 ❌

Results for commit 38b77b3.

♻️ This comment has been updated with latest results.

Copy link

@weedqian weedqian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me.

@wangchao1230 wangchao1230 merged commit e8d564b into main Jul 17, 2024
90 checks passed
@wangchao1230 wangchao1230 deleted the users/ninhu/async_evaluators branch July 17, 2024 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants