-
Notifications
You must be signed in to change notification settings - Fork 901
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
[Executor][Bugfix] Adjust flow traces logic to make sure error is correctly raised #2076
Conversation
SDK CLI Global Config Test Result heta/failure-trace2 tests 2 ✅ 46s ⏱️ Results for commit 71a024e. ♻️ This comment has been updated with latest results. |
promptflow SDK CLI Azure E2E Test Result heta/failure-trace 4 files 4 suites 3m 22s ⏱️ Results for commit 71a024e. ♻️ This comment has been updated with latest results. |
Executor Unit Test Result heta/failure-trace733 tests 733 ✅ 45s ⏱️ Results for commit 71a024e. ♻️ This comment has been updated with latest results. |
Executor E2E Test Result heta/failure-trace197 tests 195 ✅ 4m 11s ⏱️ Results for commit 71a024e. ♻️ This comment has been updated with latest results. |
SDK CLI Test Result heta/failure-trace 12 files 12 suites 43m 42s ⏱️ Results for commit 71a024e. ♻️ This comment has been updated with latest results. |
997b310
to
71a024e
Compare
Description
Currently flow level trace is always "Success" since we wrapped it in wrong place.
Update such code to make sure the error is correctly caught in the span.
This pull request includes significant changes to the
FlowExecutor
class in thesrc/promptflow/promptflow/executor/flow_executor.py
file. The primary changes involve refactoring the_exec_with_trace
method and its usages throughout the class. The method has been split into two separate methods:_exec_inner_with_trace
and_exec_inner
. The functions_exec
,exec_line
,_exec_in_thread
, andexec
have been updated to use these new methods. The changes aim to improve the readability and maintainability of the code.Updates to method usages:
exec
method now calls_exec
instead of_exec_with_trace
._exec_in_thread
method now calls_exec
instead of_exec_with_trace
.exec_line
method now calls_exec
instead of_exec_with_trace
._exec
method now calls_exec_inner_with_trace
instead of containing the logic that was moved to_exec_inner
.All Promptflow Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines