ProgramBench
ProgramBench run script
minisweagent.run.benchmarks.programbench
Run mini-SWE-agent on ProgramBench instances in batch mode.
DEFAULT_CONFIG_FILE
module-attribute
DEFAULT_CONFIG_FILE = (
builtin_config_dir / "benchmarks" / "programbench.yaml"
)
app
module-attribute
app = Typer(rich_markup_mode='rich', add_completion=False)
ProgramBenchAgent
ProgramBenchAgent(
*args,
progress_manager: RunBatchProgressManager,
instance_id: str = "",
**kwargs,
)
Bases: ProgressTrackingAgent
Drops raw_output from tool-result messages to avoid bloating trajectories.
Source code in src/minisweagent/run/benchmarks/utils/common.py
10 11 12 13 | |
serialize
serialize(*extra_dicts) -> dict
Source code in src/minisweagent/run/benchmarks/programbench.py
36 37 38 39 40 41 42 43 | |
copy_submission
copy_submission(
env, dest: Path, *, src: str = "/workspace"
) -> None
Tar+gzip the workspace from the container to a local file.
Source code in src/minisweagent/run/benchmarks/programbench.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
process_instance
process_instance(
instance: dict,
output_dir: Path,
config: dict,
progress_manager: RunBatchProgressManager,
) -> None
Process a single ProgramBench instance.
Source code in src/minisweagent/run/benchmarks/programbench.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
main
main(
slice_spec: str = Option(
"",
"--slice",
help="Slice specification (e.g., '0:5' for first 5 instances)",
rich_help_panel="Data selection",
),
filter_spec: str = Option(
"",
"--filter",
help="Filter instance IDs by regex",
rich_help_panel="Data selection",
),
shuffle: bool = Option(
False,
"--shuffle",
help="Shuffle instances",
rich_help_panel="Data selection",
),
output: str = Option(
"",
"-o",
"--output",
help="Output directory",
rich_help_panel="Basic",
),
workers: int = Option(
1,
"-w",
"--workers",
help="Number of worker threads for parallel processing",
rich_help_panel="Basic",
),
model: str | None = Option(
None,
"-m",
"--model",
help="Model to use",
rich_help_panel="Basic",
),
model_class: str | None = Option(
None,
"--model-class",
help="Model class to use",
rich_help_panel="Advanced",
),
redo_existing: bool = Option(
False,
"--redo-existing",
help="Redo existing instances",
rich_help_panel="Data selection",
),
config_spec: list[str] = Option(
[str(DEFAULT_CONFIG_FILE)],
"-c",
"--config",
help="Config files (merged left to right)",
rich_help_panel="Basic",
),
environment_class: str | None = Option(
None,
"--environment-class",
help="Environment type (e.g., docker, singularity)",
rich_help_panel="Advanced",
),
) -> None
Source code in src/minisweagent/run/benchmarks/programbench.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |