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(reviewer): No cost limit check for human model
Kilian Lieret92ff17ddaf13
diff --git a/sweagent/agent/reviewer.py b/sweagent/agent/reviewer.pyindex 8033c373..d14718d1 100644--- a/sweagent/agent/reviewer.py+++ b/sweagent/agent/reviewer.py@@ -11,7 +11,7 @@ from typing import Any, Literalfrom jinja2 import Templatefrom pydantic import BaseModel-from sweagent.agent.models import AbstractModel, InstanceStats+from sweagent.agent.models import AbstractModel, HumanModel, HumanThoughtModel, InstanceStatsfrom sweagent.agent.problem_statement import ProblemStatementfrom sweagent.exceptions import AttemptCostLimitExceededErrorfrom sweagent.types import BinaryReviewerResult, History, ReviewerResult, ReviewSubmission, Trajectory, TrajectoryStep@@ -541,6 +541,8 @@ class ReviewLoop(AbstractReviewLoop):if (self._loop_config.min_budget_for_new_attempt > 0and remaining_budget < self._loop_config.min_budget_for_new_attempt+ and not isinstance(self._model, HumanModel)+ and not isinstance(self._model, HumanThoughtModel)):logger.info(f"{self.LOG_PREFIX}Exiting retry loop ({stat_str}): Not enough budget left for a new attempt")return False