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

Fix bugs about OpenAI tokens #3067

Merged
merged 19 commits into from May 10, 2024
Merged

Conversation

lumoslnt
Copy link
Contributor

@lumoslnt lumoslnt commented Apr 29, 2024

Description

Fix some bugs about OpenAI tokens:

  • For the batch run of flex flow, there is no tokens in BatchResult.system_metrices, since we get the tokens from node run info in line result, but the flex flow doesn't have node run info, in this PR we get the tokens from flow run infos.
  • Ensure not raising exceptions from OpenAIMetricsCalculator.

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 Apr 29, 2024

promptflow-tracing test result

 12 files   12 suites   7m 17s ⏱️
 19 tests  19 ✅ 0 💤 0 ❌
228 runs  228 ✅ 0 💤 0 ❌

Results for commit 22d64e8.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 29, 2024

promptflow SDK CLI Azure E2E Test Result dev/linatang/fix-bugs-about-openai-tokens

  4 files    4 suites   4m 9s ⏱️
241 tests 205 ✅  36 💤 0 ❌
964 runs  820 ✅ 144 💤 0 ❌

Results for commit 22d64e8.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 29, 2024

promptflow-core test result

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 22d64e8.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 29, 2024

SDK CLI Global Config Test Result dev/linatang/fix-bugs-about-openai-tokens

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

Results for commit 22d64e8.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 29, 2024

Executor Unit Test Result dev/linatang/fix-bugs-about-openai-tokens

792 tests   792 ✅  3m 43s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 22d64e8.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 29, 2024

Executor E2E Test Result dev/linatang/fix-bugs-about-openai-tokens

243 tests   238 ✅  5m 33s ⏱️
  1 suites    5 💤
  1 files      0 ❌

Results for commit 22d64e8.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 29, 2024

SDK CLI Test Result dev/linatang/fix-bugs-about-openai-tokens

    4 files      4 suites   1h 1m 6s ⏱️
  690 tests   652 ✅  38 💤 0 ❌
2 760 runs  2 608 ✅ 152 💤 0 ❌

Results for commit 22d64e8.

♻️ This comment has been updated with latest results.

@lumoslnt lumoslnt requested a review from a team as a code owner April 29, 2024 09:35
@lumoslnt lumoslnt merged commit 4845e67 into main May 10, 2024
80 checks passed
@lumoslnt lumoslnt deleted the dev/linatang/fix-bugs-about-openai-tokens branch May 10, 2024 06:28
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.

Tokens_per_message issue [BUG] - Tracing for Langchain functions agent fails.
3 participants