Skip to content

Run single

sweagent.run.run_single.RunSingleConfig

Bases: BaseSettings

env class-attribute instance-attribute

env: EnvironmentConfig = Field(default_factory=EnvironmentConfig, description='Environment options.')

agent class-attribute instance-attribute

agent: AgentConfig = Field(description='Agent options.')

problem_statement class-attribute instance-attribute

problem_statement: ProblemStatementConfig = Field(default_factory=EmptyProblemStatement, description='Problem statement options.')

output_dir class-attribute instance-attribute

output_dir: Path = Field(default=Path('DEFAULT'), description='Output directory.')

actions class-attribute instance-attribute

actions: RunSingleActionConfig = Field(default_factory=RunSingleActionConfig)

env_var_path class-attribute instance-attribute

env_var_path: Path | None = None

Path to a .env file to load environment variables from.

set_default_output_dir

set_default_output_dir() -> None
Source code in sweagent/run/run_single.py
 99
100
101
102
def set_default_output_dir(self) -> None:
    # Needs to be called explicitly, because self._config_files will be setup
    # post-init.
    self.output_dir = _get_default_output_dir(self.output_dir, self.problem_statement, self.agent)

sweagent.run.run_single.RunSingleActionConfig pydantic-model

Bases: BaseModel

Run real-life actions (opening PRs, etc.) if we can solve the issue.

Config:

  • extra: forbid

Fields:

open_pr pydantic-field

open_pr: bool = False

pr_config pydantic-field

pr_config: OpenPRConfig

apply_patch_locally pydantic-field

apply_patch_locally: bool = False