-
Notifications
You must be signed in to change notification settings - Fork 22
Optimization Impact #750
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
Merged
Merged
Optimization Impact #750
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
df0b176
wip
aseembits93 aefedda
works, todo cleanup
aseembits93 2e8414f
todo cleanup
aseembits93 cdbe3e0
Merge branch 'main' into opt-impact-aseem
aseembits93 642ac43
Merge branch 'main' into opt-impact-aseem
HeshamHM28 d209140
Merge remote-tracking branch 'origin/main' into opt-impact-aseem
aseembits93 d766dab
logging done, start experimenting, using diff instead of raw strings
aseembits93 6a4d842
precommit fix
aseembits93 530158c
ready to review
aseembits93 4d9723d
bugfix
aseembits93 eb032bb
Merge remote-tracking branch 'origin/main' into opt-impact-aseem
aseembits93 ab1c385
add explanation
aseembits93 e380b95
Merge branch 'main' into opt-impact-aseem
aseembits93 4dcb9af
Merge remote-tracking branch 'origin/main' into opt-impact-aseem
aseembits93 90a1355
speedup relative
aseembits93 c2ffeae
Apply suggestion from @aseembits93
aseembits93 b991c33
Merge branch 'main' into opt-impact-aseem
KRRT7 27fb31b
Merge branch 'main' into opt-impact-aseem
aseembits93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1458,14 +1458,22 @@ def process_review( | |
| } | ||
|
|
||
| raise_pr = not self.args.no_pr | ||
| staging_review = self.args.staging_review | ||
|
|
||
| if raise_pr or self.args.staging_review: | ||
| if raise_pr or staging_review: | ||
| data["root_dir"] = git_root_dir() | ||
|
|
||
| if raise_pr and not self.args.staging_review: | ||
| try: | ||
| # modify argument of staging vs pr based on the impact | ||
| opt_impact_response = self.aiservice_client.get_optimization_impact(**data) | ||
| if opt_impact_response == "low": | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: add a statement for logging on response here |
||
| raise_pr = False | ||
| staging_review = True | ||
| except Exception as e: | ||
| logger.debug(f"optimization impact response failed, investigate {e}") | ||
| if raise_pr and not staging_review: | ||
| data["git_remote"] = self.args.git_remote | ||
| check_create_pr(**data) | ||
| elif self.args.staging_review: | ||
| elif staging_review: | ||
| response = create_staging(**data) | ||
| if response.status_code == 200: | ||
| staging_url = f"https://app.codeflash.ai/review-optimizations/{self.function_trace_id[:-4] + exp_type if self.experiment_id else self.function_trace_id}" | ||
|
|
@@ -1504,7 +1512,7 @@ def process_review( | |
| self.revert_code_and_helpers(original_helper_code) | ||
| return | ||
|
|
||
| if self.args.staging_review: | ||
| if staging_review: | ||
| # always revert code and helpers when staging review | ||
| self.revert_code_and_helpers(original_helper_code) | ||
| return | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Q: How much existing tests and generated tests are effective in context. Did we try the results ignoring them as well?