Skip to content

Commit 1259f3a

Browse files
committed
edit branch name
1 parent 0a9c2d6 commit 1259f3a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

agent/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def config(
163163
@agent_app.command()
164164
def run(
165165
branch: str = typer.Argument(
166-
None,
166+
...,
167167
help="Branch name of current run",
168168
),
169169
override_previous_changes: bool = typer.Option(

agent/run_agent.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from datasets import load_dataset
55
from git import Repo
66
from agent.agent_utils import (
7-
args2string,
87
create_branch,
98
get_message,
109
get_target_edit_files,
@@ -88,6 +87,10 @@ def run_agent_for_repo(
8887
f"{agent_config.agent_name} is not implemented; please add your implementations in baselines/agents.py."
8988
)
9089

90+
# # if branch_name is not provided, create a new branch name based on agent_config
91+
# if branch is None:
92+
# branch = args2string(agent_config)
93+
9194
create_branch(local_repo, branch, example["base_commit"])
9295

9396
# in cases where the latest commit of branch is not commit 0
@@ -169,7 +172,7 @@ def run_agent_for_repo(
169172

170173

171174
def run_agent(
172-
branch: Optional[str],
175+
branch: str,
173176
override_previous_changes: bool,
174177
backend: str,
175178
agent_config_file: str,
@@ -204,10 +207,6 @@ def run_agent(
204207
# if len(filtered_dataset) > 1:
205208
# sys.stdout = open(os.devnull, "w")
206209

207-
# if branch_name is not provided, create a new branch name based on agent_config
208-
if branch is None:
209-
branch = args2string(agent_config)
210-
211210
with TerminalDisplay(len(filtered_dataset)) as display:
212211
not_started_repos = [
213212
cast(RepoInstance, example)["repo"].split("/")[-1]

0 commit comments

Comments
 (0)