-
Notifications
You must be signed in to change notification settings - Fork 22
[LSP] log the errors from the failed behavior test results (CF-757) #830
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
base: main
Are you sure you want to change the base?
Conversation
Codeflash Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
) | ||
|
||
try: | ||
benchmarking_results, _ = self.run_and_parse_tests( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_
is needed
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
This PR is now faster! 🚀 mohammed ahmed accepted my code suggestion above. |
did_pass_all_tests = all(result.did_pass for result in behavioral_results) | ||
if not did_pass_all_tests: | ||
return Failure("Tests failed to pass for the original code.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're not quite good with our tests to where this is going to work smoothly, currently we have tests that fail frequently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you are saying if the coverage wasn't enough, and some tests failed,
optimization didn't fail necessary because of failed tests? and what do you suggest instead ? @KRRT7
User description
PR Type
Enhancement
Description
Log unique pytest error lines to LSP
Add error extraction utility function
Improve baseline failure messaging
Adjust performance tests return handling
Diagram Walkthrough
File Walkthrough
code_utils.py
Utility to extract unique pytest error lines
codeflash/code_utils/code_utils.py
extract_unique_errors(pytest_output)
E
function_optimizer.py
Log behavior test errors and refine test flow
codeflash/optimization/function_optimizer.py
extract_unique_errors
for LSP logginglsp_log
when behavior tests fail