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]

Update run_replay config loading

carlosejimenez039123183c61
diff --git a/sweagent/run/run_replay.py b/sweagent/run/run_replay.py
index af9a1dc9..f3136644 100644
--- a/sweagent/run/run_replay.py
+++ b/sweagent/run/run_replay.py
@@ -92,7 +92,9 @@ class RunReplay:
def _get_config_from_agent(self, traj_data):
try:
- config = RunSingleConfig.model_validate(self._traj_data["replay_config"])
+ if isinstance(traj_data["replay_config"], str):
+ traj_data["replay_config"] = json.loads(traj_data["replay_config"])
+ config = RunSingleConfig.model_validate(traj_data["replay_config"])
except KeyError:
msg = "Replay config not found in trajectory. Are you running on an old trajectory?"
raise ValueError(msg)