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]

Doc: Fix inspectors docs; sort docs into menus

Kilian Lieret96ca95724b36
diff --git a/docs/assets/inspector_1.png b/docs/assets/inspector_1.png
new file mode 100644
index 00000000..c0f5f80e
Binary files /dev/null and b/docs/assets/inspector_1.png differ
diff --git a/docs/assets/inspector_2.png b/docs/assets/inspector_2.png
new file mode 100644
index 00000000..c3bd2755
Binary files /dev/null and b/docs/assets/inspector_2.png differ
diff --git a/docs/usage/cl_tutorial.md b/docs/usage/cl_tutorial.md
index 3957bb8f..07b3ea4e 100644
--- a/docs/usage/cl_tutorial.md
+++ b/docs/usage/cl_tutorial.md
@@ -253,10 +253,6 @@ This time, `pip install -e .` is called before SWE-agent gets to work, installin
REMOVED OUTDATED
-## Speeding up SWE-agent <a name="speedup"></a>
-
-Do we have anything to mention here? (mostly removed outdated stuff)
-
## Taking actions
* As mentioned [above](#specifying-the-repository), you can use `--apply_patch_locally` to have SWE-agent apply successful solution attempts to local files.
diff --git a/docs/usage/inspector.md b/docs/usage/inspector.md
index 134ae966..08ac5a76 100644
--- a/docs/usage/inspector.md
+++ b/docs/usage/inspector.md
@@ -2,30 +2,28 @@
We provide a web interface for visualizing [`.traj` files](trajectories.md) from the `trajectories` folder more easily.
-**Set Up**
-
-* Change to the `inspector` directory
-* Run `python server.py --directory insert_full_absolute_path_to_the_trajectories_folder_here/trajectories`
-* Open http://localhost:8000 in your browser to use the inspector.
-
-**Additional flags**
-
-- `--data_path`: Path to SWE-bench style dataset that trajectories were generated for (Optional)
-- `--directory`: Directory of trajectories to inspect (Defaults to `./trajectories` folder)
-- `--port`: Port to host web app (Defaults to `8000`).
-
**Example Usage**
-From running the command:
+Run the inspector in the current directory (this is where your `*.traj` files are):
```bash
-python server.py --directory /Users/ofirp/swe-agent/trajectories
+sweagent inspector
```
The inspector will then be launched in the browser:
-![trajectory inspector](../assets/inspector.png)
+![trajectory inspector](../assets/inspector_1.png){: style="width: 49%;"}
+![trajectory inspector](../assets/inspector_2.png){: style="width: 49%;"}
-If you do not see evaluation results, make sure that the SWE-bench output
-is called `results.json` and is in the same directory as the trajectories.
+!!! tip
+ If you do not see evaluation results, make sure that the SWE-bench output
+ is called `results.json` and is in the same directory as the trajectories.
+
+!!! tip
+ To see gold patches, point `--data_path` to the SWE-bench dataset.
+
+**Additional flags**
+
+- `--directory`: Directory of trajectories to inspect (Defaults to current directory)
+- `--port`: Port to host web app (Defaults to `8000`).
{% include-markdown "../_footer.md" %}
diff --git a/mkdocs.yml b/mkdocs.yml
index c4da5bef..50d695a5 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -51,32 +51,34 @@ markdown_extensions:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
nav:
- - Home: index.md
- Getting Started:
+ - index.md
- "Installation": "installation/index.md"
+ - "Tutorials":
+ - "Command line basics": "usage/cl_tutorial.md"
+ - "Solving coding challenges": "usage/coding_challenges.md"
- "API keys": "installation/keys.md"
+ - "FAQ": "usage/usage_faq.md"
- User Guide:
- "usage/index.md"
- - "Command line usage": "usage/cl_tutorial.md"
- - "Solving coding challenges": "usage/coding_challenges.md"
- "Trajectories": "usage/trajectories.md"
- "Trajectory inspector": "usage/inspector.md"
- "Benchmarking": "usage/benchmarking.md"
- "Config files": "config/config.md"
- "Demonstrations": "config/demonstrations.md"
- - "FAQ": "usage/usage_faq.md"
- - Development:
- - "Contribution guide": "dev/contribute.md"
- - "Formatting conflicts": "dev/formatting_conflicts.md"
- - "FAQ": "faq.md"
- - "Changelog": "dev/changelog.md"
+ - Development:
+ - "Architecture": "background/architecture.md"
+ - "Contribution guide": "dev/contribute.md"
+ - "Formatting conflicts": "dev/formatting_conflicts.md"
+ - "Changelog": "dev/changelog.md"
- API Reference:
- "reference/index.md"
- - "Problem statements": "reference/problem_statements.md"
- - "Repository": "reference/repo.md"
- - "Model config": "reference/model_config.md"
- - "Agent config": "reference/agent_config.md"
- - "Environment config": "reference/env_config.md"
+ - Configuration objects:
+ - "Problem statements": "reference/problem_statements.md"
+ - "Repository": "reference/repo.md"
+ - "Model config": "reference/model_config.md"
+ - "Agent config": "reference/agent_config.md"
+ - "Environment config": "reference/env_config.md"
- "Agent class": "reference/agent.md"
- "Environment class": "reference/env.md"
- "Exceptions": "reference/exceptions.md"