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: Add status from swe-rex to spinner status
Kilian Lieret49ccdd4bac9a
diff --git a/sweagent/run/run_batch.py b/sweagent/run/run_batch.pyindex 44fd55c2..da9063f4 100644--- a/sweagent/run/run_batch.py+++ b/sweagent/run/run_batch.py@@ -13,6 +13,7 @@ from typing import Selffrom pydantic_settings import BaseSettingsfrom rich.live import Live+from swerex.deployment.hooks.status import SetStatusDeploymentHookfrom sweagent.agent.agents import Agent, AgentConfigfrom sweagent.agent.hooks.status import SetStatusAgentHook@@ -191,10 +192,10 @@ class RunBatch:raise _BreakLoopexcept Exception as e:self.logger.error(traceback.format_exc())- if self._raise_exceptions:- raiseself.logger.error(f"❌ Failed on {instance.problem_statement.id}: {e}")self._progress_manager.on_uncaught_exception(instance.problem_statement.id, e)+ if self._raise_exceptions:+ raiseelse:self._progress_manager.on_instance_end(instance.problem_statement.id, exit_status=result.info.get("exit_status", "unknown_exit")@@ -217,6 +218,9 @@ class RunBatch:)env.logger.setLevel(logging.DEBUG if self._num_workers == 1 else logging.INFO)env.deployment.logger.setLevel(logging.DEBUG if self._num_workers == 1 else logging.WARNING) # type: ignore+ env.deployment.add_hook(+ SetStatusDeploymentHook(instance.problem_statement.id, self._progress_manager.update_instance_status)+ )env.start()self._chooks.on_instance_start(index=0, env=env, problem_statement=instance.problem_statement)try: