Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Remove max_n_exit_cost config setting

Kilian Lieret66a641528d92
diff --git a/sweagent/agent/reviewer.py b/sweagent/agent/reviewer.py
index b7aff61d..558e7665 100644
--- a/sweagent/agent/reviewer.py
+++ b/sweagent/agent/reviewer.py
@@ -155,9 +155,6 @@ class ScoreRetryLoopConfig(BaseModel):
#: Given a maximum score, the maximum number of attempts
#: to try. This is a very general way of configuring when to stop.
- #: If set > 0 and there are more than this number of consecutive attempts
- #: with an 'exit cost' exit stats, the review loop will quit.
- max_n_consec_exit_cost: int = 0
#: Minimal $ that need to be left in order for us to start a new attempt
min_budget_for_new_attempt: float = 0.0
#: Override model temperature for first len(list) attempts
@@ -379,11 +376,6 @@ class ScoreRetryLoop(AbstractRetryLoop):
)
return False
- max_n_exit_cost = self._config.max_n_consec_exit_cost
- if self._n_consec_exit_cost >= max_n_exit_cost > 0:
- self.logger.info(f"Exiting retry loop ({stat_str}): {max_n_exit_cost} exit cost attempts reached")
- return False
-
# Todo: Check if there's enough budget left for a new reasonable attempt
remaining_budget = self._config.cost_limit - self._total_attempt_stats.instance_cost
if self._config.min_budget_for_new_attempt > 0 and remaining_budget < self._config.min_budget_for_new_attempt: