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]
Update demonstrations.md
Ofir Press033171d1f38e
diff --git a/docs/config/demonstrations.md b/docs/config/demonstrations.mdindex b054079b..d54e41fb 100644--- a/docs/config/demonstrations.md+++ b/docs/config/demonstrations.md@@ -6,16 +6,16 @@ For simplicity we only ingest demonstrations in the from of a trajectory file. HDemo (yaml) files are stored in the `make_demos/demos` directory by default and consist primarily of the sequence of actions that an LM would need to take to complete a task. It's important that your demo have the proper format to be parsed by SWE-agent and your config.-## Converting an existing demonstration+## Converting an existing trajectory into a demonstration-Here's how you can make a demo:+Here's how you can make a demo from an existing trajectory file:1. Find a basic trajectory that you already like and want to use as the basis for your demo.For instance, consider the `.traj` files in the [`trajectories/demonstrations/` folder](https://github.com/princeton-nlp/SWE-agent/tree/main/trajectories/demonstrations).2. Run `python convert_traj_to_demo.py <path to trajectory file.traj>` to convert the trajectory to a demo.This demo will be saved as a readable yaml file in the `make_demos/demos` directory.3. Edit the demo by hand to make it work for your particular use case and configuration.-4. Run `python run_replay.py --traj_path <path to demo> --config_file <path to config file>` to execute the actions of the demo, have the system generate the execution output, and ensure that it works as expected.+4. (Optional) Run `python run_replay.py --traj_path <path to demo> --config_file <path to config file>` to execute the actions of the demo, have the system generate the execution output, and ensure that it works as expected.5. Inspect the resulting trajectory to ensure it was executed correctly.## Manually creating a custom trajectory <a name="manual"></a>@@ -27,4 +27,4 @@ To edit text in `human` mode:2. Write the text you want to insert. Feel free to write the text across multiple lines.3. Press `return` then write `end_of_edit` and then press `return` again to submit the edit.-{% include-markdown "../_footer.md" %}\ No newline at end of file+{% include-markdown "../_footer.md" %}