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]

Enh: Bump some log severities

Kilian Lieretcd2993d89665
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.py
index 5dfe5bfc..b6a63dcf 100644
--- a/sweagent/agent/agents.py
+++ b/sweagent/agent/agents.py
@@ -321,7 +321,7 @@ class RetryAgent(AbstractAgent):
try:
best_attempt_idx = self._rloop.get_best()
except Exception as e:
- self.logger.error(f"Error getting best attempt index: {e}. Setting to 0.", exc_info=True)
+ self.logger.critical(f"Error getting best attempt index: {e}. Setting to 0.", exc_info=True)
best_attempt_idx = 0
data |= copy.deepcopy(self._attempt_data[best_attempt_idx]) # type: ignore
data["info"]["best_attempt_idx"] = best_attempt_idx
diff --git a/sweagent/agent/reviewer.py b/sweagent/agent/reviewer.py
index ccdbc46b..546441ef 100644
--- a/sweagent/agent/reviewer.py
+++ b/sweagent/agent/reviewer.py
@@ -340,7 +340,7 @@ class Chooser:
try:
preselector_output = preselector.choose(problem_statement, [input[i] for i in selected_indices])
except Exception as e:
- self.logger.error(f"Preselector failed: {e}", exc_info=True)
+ self.logger.critical(f"Preselector failed: {e}", exc_info=True)
preselector_output = None
if preselector_output and preselector_output.chosen_idx:
try:
@@ -360,7 +360,7 @@ class Chooser:
response = self.model.query(messages)["message"] # type: ignore
chosen_idx = self.interpret(response)
except Exception as e:
- self.logger.error(f"Chooser failed: {e}", exc_info=True)
+ self.logger.critical(f"Chooser failed: {e}", exc_info=True)
chosen_idx = None
if chosen_idx is None or not (0 <= chosen_idx < len(selected_indices)):
self.logger.error(f"Invalid chosen index: {chosen_idx}, using first index")