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]

make history_processor -> history_processors

carlosejimenez48df7fefbec8
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.py
index b9ca45bf..e3dc8dd9 100644
--- a/sweagent/agent/agents.py
+++ b/sweagent/agent/agents.py
@@ -233,7 +233,6 @@ class Agent:
# Chain the history processors
processed_history = filtered_history
- breakpoint()
for processor in self.history_processors:
processed_history = processor(processed_history)
diff --git a/sweagent/agent/history_processors.py b/sweagent/agent/history_processors.py
index 3fa4be69..5a78c706 100644
--- a/sweagent/agent/history_processors.py
+++ b/sweagent/agent/history_processors.py
@@ -50,7 +50,6 @@ def _last_n_history(history, n):
else:
data["content"] = f'Old output omitted ({len(entry["content"].splitlines())} lines)'
new_history.append(data)
- breakpoint()
return new_history
diff --git a/tests/test_data/trajectories/gpt4__swe-agent-test-repo__default_from_url__t-0.00__p-0.95__c-3.00__install-1/6e44b9__sweagenttestrepo-1c2844.traj b/tests/test_data/trajectories/gpt4__swe-agent-test-repo__default_from_url__t-0.00__p-0.95__c-3.00__install-1/6e44b9__sweagenttestrepo-1c2844.traj
index 058d4258..f004f650 100644
--- a/tests/test_data/trajectories/gpt4__swe-agent-test-repo__default_from_url__t-0.00__p-0.95__c-3.00__install-1/6e44b9__sweagenttestrepo-1c2844.traj
+++ b/tests/test_data/trajectories/gpt4__swe-agent-test-repo__default_from_url__t-0.00__p-0.95__c-3.00__install-1/6e44b9__sweagenttestrepo-1c2844.traj
@@ -285,10 +285,12 @@
"execution_timeout": 30,
"install_timeout": 300
},
- "history_processor": {
- "n": 5,
- "type": "last_n_observations"
- },
+ "history_processors": [
+ {
+ "n": 5,
+ "type": "last_n_observations"
+ }
+ ],
"model": {
"name": "gpt-4o",
"per_instance_cost_limit": 3.0,