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]
Split between configuration and development (#407)
Kilian Lieret7f9fd139c625
diff --git a/docs/dev/commands.md b/docs/config/commands.mdsimilarity index 100%rename from docs/dev/commands.mdrename to docs/config/commands.mddiff --git a/docs/dev/config.md b/docs/config/config.mdsimilarity index 100%rename from docs/dev/config.mdrename to docs/config/config.mddiff --git a/docs/dev/demonstrations.md b/docs/config/demonstrations.mdsimilarity index 100%rename from docs/dev/demonstrations.mdrename to docs/config/demonstrations.mddiff --git a/docs/dev/modify.md b/docs/dev/code_structure.mdsimilarity index 66%rename from docs/dev/modify.mdrename to docs/dev/code_structure.mdindex 5b8a67d7..b44dd535 100644--- a/docs/dev/modify.md+++ b/docs/dev/code_structure.md@@ -1,15 +1,4 @@-# Modifying the behavior of SWE-agent--## Changing prompts and other configuration--The easiest way to modify the behavior of SWE-agent is to change prompts and similar settings.-This can be done using the config files. See [here](config.md) for more information.--## Changing the demonstrations--Any [trajectory](../usage/trajectories.md) can be turned into a new demonstrations. See [here](demonstrations.md) for how it's done.--## Code structure+# Code structure* See the [`scripts/`](https://github.com/princeton-nlp/SWE-agent/tree/main/scripts/) folder for other useful scripts and details.* See the [`config/`](https://github.com/princeton-nlp/SWE-agent/tree/main/config/) folder for details about how you can define your own configuration!diff --git a/docs/usage/cl_tutorial.md b/docs/usage/cl_tutorial.mdindex 6b2e2f71..b671cfdf 100644--- a/docs/usage/cl_tutorial.md+++ b/docs/usage/cl_tutorial.md@@ -22,14 +22,14 @@ Here,* `--model_name` sets the language model that is used by SWE-agent (with `gpt4` being the default). More information on the available models in our [FAQ](faq.md)* `--data_path` points to the source of the *problem statement* (for example, the GitHub issue that you want to solve). You can also point it to local files (see [below](#specifying-the-repository))-* `--config_file` includes settings such as the prompts. Changing the config file is the easiest way to get started with modifying SWE-agent (more advanced options are discussed [here](../dev/config.md)).+* `--config_file` includes settings such as the prompts. Changing the config file is the easiest way to get started with modifying SWE-agent (more advanced options are discussed [here](../config/config.md)).* `--per_instance_cost_limit` limits the total inference cost to $2 (default is $3).!!! tip "All options"Run `python run.py --help` to see all available options for `run.py`. This tutorial will only cover a subset of options.!!! tip "Running more than once"- * The complete details of the run are saved as a "trajectory" file (more about them [here](trajectories.md)). They can also be turned into new [demonstrations](../dev/modify.md).+ * The complete details of the run are saved as a "trajectory" file (more about them [here](trajectories.md)). They can also be turned into new [demonstrations](../config/demonstrations.md).* If you run the same command more than once, you will find that SWE-agent aborts with ` Skipping existing trajectory`. You can either remove the trajectory from the warning message, or add the `--skip_existing=False` flag.diff --git a/docs/usage/trajectories.md b/docs/usage/trajectories.mdindex ab90c426..fec235ee 100644--- a/docs/usage/trajectories.md+++ b/docs/usage/trajectories.md@@ -47,6 +47,6 @@ Each call to `run.py` produces a single `trajectories/<user name>/<experiment na!!! tip* Evaluation is not completed by `run.py`, it is a separate step (see [benchmarking](benchmarking.md))* `all_preds.jsonl` can be referenced directly into `evaluation/run_eval.sh` to run evaluation (see [benchmarking](benchmarking.md))- * Trajectories can be turned into custom demonstrations for SWE-agent ([more information](../dev/demonstrations.md)).+ * Trajectories can be turned into custom demonstrations for SWE-agent ([more information](../config/demonstrations.md)).{% include-markdown "../_footer.md" %}\ No newline at end of filediff --git a/mkdocs.yml b/mkdocs.ymlindex a932f2f1..27f7ef07 100644--- a/mkdocs.yml+++ b/mkdocs.yml@@ -58,12 +58,13 @@ nav:- "Trajectory inspector": "usage/inspector.md"- "FAQ": "usage/faq.md"- "Benchmarking": "usage/benchmarking.md"+ - Configuration:+ - "Config files": "config/config.md"+ - "Command definitions": "config/commands.md"+ - "Demonstrations": "config/demonstrations.md"- Development:- - "Modifying swe-agent": "dev/modify.md"- - "Config files": "dev/config.md"- - "Command definitions": "dev/commands.md"- - "Demonstrations": "dev/demonstrations.md"- "Contribution guide": "dev/contribute.md"+ - "Code structure": "dev/code_structure.md"plugins:- glightbox- search