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]

Minor prettification of progress

Kilian Lieretfe7b98129343
diff --git a/sweagent/agent/hooks/status.py b/sweagent/agent/hooks/status.py
index a2f80eff..e5cfe91f 100644
--- a/sweagent/agent/hooks/status.py
+++ b/sweagent/agent/hooks/status.py
@@ -16,7 +16,7 @@ class SetStatusAgentHook(AbstractAgentHook):
def on_step_start(self):
self._i_step += 1
- self._update(f"Step {self._i_step:<3} (${self._cost:.2f})")
+ self._update(f"Step {self._i_step:>3} (${self._cost:.2f})")
def on_step_done(self, *, step: StepOutput, info: AgentInfo):
self._cost = info["model_stats"]["instance_cost"] # type: ignore
diff --git a/sweagent/run/_progress.py b/sweagent/run/_progress.py
index 3abd51b1..d1e0b8d4 100644
--- a/sweagent/run/_progress.py
+++ b/sweagent/run/_progress.py
@@ -6,6 +6,7 @@ from threading import Lock
from rich.console import Group
from rich.progress import (
BarColumn,
+ MofNCompleteColumn,
Progress,
SpinnerColumn,
TaskID,
@@ -48,6 +49,7 @@ class RunBatchProgressManager:
SpinnerColumn(),
TextColumn("[progress.description]{task.description} (${task.fields[total_cost]})"),
BarColumn(),
+ MofNCompleteColumn(),
TaskProgressColumn(),
TimeElapsedColumn(),
TimeRemainingColumn(),
@@ -73,7 +75,7 @@ class RunBatchProgressManager:
# assign it back to the render group.
t = Table()
t.add_column("Exit Status")
- t.add_column("Count")
+ t.add_column("Count", justify="right", style="bold cyan")
t.add_column("Most recent instances")
t.show_header = False
with self._lock: