This section covers the environment requirements for SWEAgent itself. Our code is mainly organized in the SE directory.
- Install dependencies:
pip install --editable .- Verify installation:
sweagent --helpBasic run command:
python SE/basic_run.py --config <Your Path>Run command using crossover operator:
python SE/basic_run.py --config SE/configs/se_configs/crossover_test.yaml--config: Specify configuration file path, allows customization of different configuration combinations- For other parameters, please refer to specific configuration file settings
The strategy parameter defines the iteration flow of the entire execution strategy, using a multi-round processing approach:
strategy:
iterations:
- base_config: "SE/configs/base_configs/baseconfig1.yaml"
operator: null
- base_config: "SE/configs/base_configs/baseconfig2.yaml"
operator: "alternative_strategy"
- base_config: "SE/configs/base_configs/baseconfig2.yaml"
operator: "crossover"-
iterations: Defines the execution sequence of 3 iteration steps
- Each iteration represents a processing phase
- Executed sequentially according to array order
-
base_config: Specifies the base configuration file used for each iteration
baseconfig1.yaml: Base configuration used in the first roundbaseconfig2.yaml: Base configuration used in subsequent rounds- Different base_configs may contain different model parameters, prompts, etc.
-
operator: Specifies the operator used for each iteration (optional)
null: No additional operator used, only base configuration"alternative_strategy": Uses alternative strategy operator to generate multiple solutions"crossover": Uses crossover operator to combine and optimize results from previous iterations
- Round 1: Uses base configuration from baseconfig1.yaml, no additional operator loaded
- Round 2: Switches to baseconfig2.yaml configuration, loads alternative_strategy operator to generate alternative strategies
- Round 3: Continues using baseconfig2.yaml, loads crossover operator to perform crossover optimization on previous results
This design allows using different strategy combinations at different stages, achieving evolution and optimization of solutions through the crossover operator.
- Can customize different configuration combinations in the config directory
- Supports flexible parameter configuration and strategy selection
- Configuration files use YAML format, easy to modify and extend
- Can continue writing custom operators in the operator directory
- Supports modular operator combinations
- Provides rich operator interfaces for functionality extension
- Framework design supports multiple runtime modes
- Can add new functional modules as needed
- Supports different evaluation strategies and optimization schemes
- Implementation of solution selection (evaluation function)
- Development of enhanceoperator operator functionality
- Complete testing and validation of se_run.py (currently use SE/basic_run.py), support checkpoint resumption