Skip to content

[PB] Rollout fixes - use responses API for o3/o4 and preserve log files #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ async def solve(state: TaskState, generate: Generate) -> TaskState:
model = get_model()
setattr(model, "total_retry_time", 0)
setattr(model, "generate", generate_patched)
if "o3" in model.api.model_name or "o4" in model.api.model_name:
model.api.responses_api = True

# main loop (state.completed checks message_limit and token_limit)
while not state.completed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ async def solve(state: TaskState, generate: Generate) -> TaskState:
model = get_model()
setattr(model, "total_retry_time", 0)
setattr(model, "generate", generate_patched)
if "o3" in model.api.model_name or "o4" in model.api.model_name:
model.api.responses_api = True

# main loop (state.completed checks message_limit and token_limit)
while not state.completed:
Expand Down Expand Up @@ -341,4 +343,4 @@ async def solve(state: TaskState, generate: Generate) -> TaskState:
end_task_tool(),
basic_agent_loop(),
]
)
)
2 changes: 1 addition & 1 deletion project/paperbench/paperbench/infra/alcatraz.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def populate_exclude_list(
cmds = [
f"MAX_SIZE={max_size}",
f"EXCLUDE_LIST={exclude_list_path}",
f"find {dir_path_on_computer} -type f -size +$MAX_SIZE -printf '%P\\n' > $EXCLUDE_LIST",
f"find {dir_path_on_computer} -type f -not -name 'agent.log' -not -name 'inspect.log' -size +$MAX_SIZE -printf '%P\\n' > $EXCLUDE_LIST",
"cat $EXCLUDE_LIST",
]
excluded = await computer.check_shell_command(" && ".join(cmds))
Expand Down