|
24 | 24 | from codeflash.benchmarking.utils import process_benchmark_data |
25 | 25 | from codeflash.cli_cmds.console import code_print, console, logger, lsp_log, progress_bar |
26 | 26 | from codeflash.code_utils import env_utils |
27 | | -from codeflash.code_utils.code_extractor import get_opt_impact_metrics |
28 | 27 | from codeflash.code_utils.code_replacer import ( |
29 | 28 | add_custom_marker_to_all_tests, |
30 | 29 | modify_autouse_fixture, |
@@ -1462,19 +1461,14 @@ def process_review( |
1462 | 1461 |
|
1463 | 1462 | if raise_pr or staging_review: |
1464 | 1463 | data["root_dir"] = git_root_dir() |
1465 | | - opt_impact_response = "" |
1466 | | - try: |
1467 | | - opt_impact_response = self.aiservice_client.get_optimization_impact(**data) |
1468 | | - except Exception as e: |
1469 | | - logger.debug(f"optimization impact response failed, investigate {e}") |
1470 | | - data["optimization_impact"] = opt_impact_response |
1471 | | - data["impact_metrics"] = get_opt_impact_metrics( |
1472 | | - self.function_to_optimize_source_code, |
1473 | | - self.function_to_optimize.file_path, |
1474 | | - self.function_to_optimize.qualified_name, |
1475 | | - self.project_root, |
1476 | | - self.test_cfg.tests_root, |
1477 | | - ) |
| 1464 | + # try: |
| 1465 | + # # modify argument of staging vs pr based on the impact |
| 1466 | + # opt_impact_response = self.aiservice_client.get_optimization_impact(**data) |
| 1467 | + # if opt_impact_response == "low": |
| 1468 | + # raise_pr = False |
| 1469 | + # staging_review = True |
| 1470 | + # except Exception as e: |
| 1471 | + # logger.debug(f"optimization impact response failed, investigate {e}") |
1478 | 1472 | if raise_pr and not staging_review: |
1479 | 1473 | data["git_remote"] = self.args.git_remote |
1480 | 1474 | check_create_pr(**data) |
|
0 commit comments