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]
Fix: Unbound local if uncaught exception
Kilian Lieret6dd60008fcf7
diff --git a/sweagent/run/run_batch.py b/sweagent/run/run_batch.pyindex decdd96e..486f3804 100644--- a/sweagent/run/run_batch.py+++ b/sweagent/run/run_batch.py@@ -195,11 +195,12 @@ class RunBatch:raiseself.logger.error(f"❌ Failed on {instance.problem_statement.id}: {e}")self._progress_manager.on_uncaught_exception(instance.problem_statement.id, e)+ else:+ self._progress_manager.on_instance_end(+ instance.problem_statement.id, exit_status=result.info.get("exit_status", "unknown_exit")+ )finally:self._progress_manager.update_exit_status_table()- self._progress_manager.on_instance_end(- instance.problem_statement.id, exit_status=result.info.get("exit_status", "unknown_exit")- )def _run_instance(self, instance: BatchInstance):self.agent_config.name = f"{instance.problem_statement.id}"