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: MISC improvements
Kilian Lieret7e9a3e014019
diff --git a/docs/usage/cl_tutorial.md b/docs/usage/cl_tutorial.mdindex 3b2c62dd..6be54542 100644--- a/docs/usage/cl_tutorial.md+++ b/docs/usage/cl_tutorial.md@@ -29,7 +29,19 @@ python run.py \1. This limits the inference cost per instance to $2. The default is $3.-TODO: Explain where to put model keys+!!! tip "Annotations"+ Notice the :material-chevron-right-circle: icon in the left margin in the code snippet? Click on it to display more information+ about the line.++The example above uses the `gpt4` model from OpenAI. In order to use it, you need to add your OpenAI API key to the environment:++```bash+export OPENAI_API_KEY=<your key>+```++alternatively, you can create a `.env` file in your working directory and put the key in there.+More information about environment: TODO+TODO: Update output@@ -80,12 +92,30 @@ python run.py \1. Make sure to add anthropic keys to the environment for this one!2. This points to the [dockerhub image](https://hub.docker.com/_/python) of the same name+```bash title="Github repo with custom problem statement" hl_lines="4"+python run.py \+ ...+ --env.repo.url=https://github.com/SWE-agent/test-repo \+ --problem_statement.text="Hey, can you fix all the bugs?"+```++For the next example, we will use a cloud-based execution environment instead of using local docker containers.+For this, you first need to set up a modal account, following the instructions at XXX++```bash title="Deployment on modal (cloud-based execution)" hl_lines="4"+python run.py \+ ...+ --env.deployment.type=modal \+ --env.deployment.image=python:3.12+```!!! 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"- * 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.+## Configuration basics++All configuration options can be specified either in `.yaml`+## Specifying the repositorydiff --git a/sweagent/run/batch_instances.py b/sweagent/run/batch_instances.pyindex 5daf6f5f..8bb5561d 100644--- a/sweagent/run/batch_instances.py+++ b/sweagent/run/batch_instances.py@@ -205,6 +205,7 @@ class InstancesFromHuggingFace(BaseModel, AbstractInstanceSource):"""Load instances from HuggingFace."""dataset_name: str+ """Name of the HuggingFace dataset. Same as when using `datasets.load_dataset`."""split: str = "dev"filter: str = ".*""""Regular expression to filter the instances by instance id."""@@ -219,7 +220,7 @@ class InstancesFromHuggingFace(BaseModel, AbstractInstanceSource):deployment: DeploymentConfig = Field(default_factory=lambda: DockerDeploymentConfig(image="python:3.11"),)- """Deployment configuration. Note that the image_name option is overwritten by the images specified in the task instances.+ """Deployment configuration. Note that the `image_name` option is overwritten by the images specified in the task instances."""type: Literal["huggingface"] = "huggingface""""Discriminator for (de)serialization/CLI. Do not change."""