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]
Allow to disable config dump to log (#537)
Kilian Lieret3ea35d4e13b1
diff --git a/run.py b/run.pyindex 9b334367..261a1250 100644--- a/run.py+++ b/run.py@@ -108,6 +108,8 @@ class ScriptArguments(FlattenedAccess, FrozenSerializable):suffix: str = ""# Raise unhandled exceptions during the run (useful for debugging)raise_exceptions: bool = False+ # Dump the entire config to the log+ print_config: bool = True@propertydef run_name(self):@@ -307,7 +309,8 @@ class OpenPRHook(MainHook):class Main:def __init__(self, args: ScriptArguments):- logger.info(f"📙 Arguments: {args.dumps_yaml()}")+ if args.print_config:+ logger.info(f"📙 Arguments: {args.dumps_yaml()}")self.args = argsself.agent = Agent("primary", args.agent)self.env = SWEEnv(args.environment)diff --git a/tests/test_run.py b/tests/test_run.pyindex cf4e84a4..69f9c081 100644--- a/tests/test_run.py+++ b/tests/test_run.py@@ -121,6 +121,7 @@ def test_script_args():),actions=ActionsArguments(open_pr=False, skip_if_commits_reference_issue=True),raise_exceptions=True,+ print_config=False,)