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]
Doc: Start writing run_batch docstring
Kilian Lieret6173ccae99ef
diff --git a/sweagent/run/run_batch.py b/sweagent/run/run_batch.pyindex 07f85e49..e7f2b7b6 100644--- a/sweagent/run/run_batch.py+++ b/sweagent/run/run_batch.py@@ -1,5 +1,35 @@"""-Run on a batch of instances/issues. For example run on all of SWE-bench.+Run on a batch of instances/issues, e.g., SWE-bench.++[cyan][bold]=== BASIC OPTIONS ===[/bold][/cyan]++ -h --help Show help text and exit+ --help_options Print specific help text and exit++[cyan][bold]=== EXAMPLES ===[/bold][/cyan]++Basic usage: Run over a [bold][cyan]SWE-bench lite[/bold][/cyan][green]:++sweagent run-batch \\+ --instances.type swe_bench \\ # configure instances+ --instances.subset lite \\+ --instances.split dev \\+ --instances.split :50 \\ # first 50 instances+ --instances.shuffle=True \\ # shuffle instances (with fixed seed)+ --config config/default.yaml \\ # configure model+ --agent.model.name gpt-4o+[/green]++[cyan][bold]=== LOADING INSTANCES ===[/bold][/cyan]++Load instances...++From a file [green]--instances.type file --instances.path /path/to/file[/green].+From huggingface [green]--instances.type huggingface --instances.dataset_name=SWE_Bench_lite --instances.split=dev[/green].++All instance specifications support the [green]filter[/green], [green]slice[/green], and [green]shuffle[/green] options.+With [green]filter[/green], you can select specific instances.+For example, [green]--instances.filter='instance_id_1|instance_id_2'"""import getpassdiff --git a/sweagent/run/run_single.py b/sweagent/run/run_single.pyindex cbdd19d3..041719c8 100644--- a/sweagent/run/run_single.py+++ b/sweagent/run/run_single.py@@ -1,18 +1,17 @@"""[cyan][bold]Run SWE-agent on a single instance taken from github or similar.[/bold][/cyan]-[cyan][bold]=== BASICOPTIONS ===[/bold][/cyan]+[cyan][bold]=== BASIC OPTIONS ===[/bold][/cyan]-h --help Show help text and exit--help_options Print specific help text and exit--config CONFIG Load additional config files. Use this option multiple times to loadmultiple files, e.g., --config config1.yaml --config config2.yaml- [cyan][bold]--... Many more options[/cyan][/bold] (run `sweagent run --print_options` for a complete overview)[cyan][bold]=== EXAMPLES ===[/bold][/cyan]Basic usage: Run over a [bold][cyan]github issue[/bold][/cyan][green]:-sweagent run --config config/config.yaml --agent.model.name "gpt-4o" \\+sweagent run --config config/default.yaml --agent.model.name "gpt-4o" \\--env.repo.github_url=https://github.com/SWE-agent/test-repo/ \\--problem_statement.github_url=https://github.com/SWE-agent/test-repo/issues/1[/green]@@ -22,7 +21,7 @@ You can set the image with [green]--env.docker.image[/green].Here's an example that uses [bold][cyan]modal[/bold][/cyan] instead of docker and also a [bold][cyan]local repository[/bold][/cyan]:-[green]sweagent run --config config/config.yaml --agent.model.name "gpt-4o" \\+[green]sweagent run --config config/default.yaml --agent.model.name "gpt-4o" \\--env.deployment.type=modal --env.repo.path /path/to/repo \\--problem_statement.path=path/to/problem_statement.md[/green]