chore: remove specified sid (#5127)

This commit is contained in:
Xingyao Wang
2024-11-19 10:41:27 -06:00
committed by GitHub
parent 1f723293db
commit ff84a3eede
3 changed files with 6 additions and 6 deletions

View File

@@ -250,9 +250,6 @@ def process_instance(
config = get_config(metadata)
# use a session id for concurrent evaluation
sid = 'ID_' + str(instance.instance_id)
# Setup the logger properly, so you can run
# multi-processing to parallelize the evaluation
if reset_logger:
@@ -284,7 +281,7 @@ def process_instance(
instruction += AGENT_CLS_TO_INST_SUFFIX[metadata.agent_class]
# Here's how you can run the agent (similar to the `main` function) and get the final task state
runtime = create_runtime(config, sid=sid)
runtime = create_runtime(config)
call_async_from_sync(runtime.connect)
initialize_runtime(runtime, instance.data_files)

View File

@@ -59,7 +59,8 @@ def create_runtime(
"""Create a runtime for the agent to run on.
config: The app config.
sid: The session id.
sid: (optional) The session id. IMPORTANT: please don't set this unless you know what you're doing.
Set it to incompatible value will cause unexpected behavior on RemoteRuntime.
headless_mode: Whether the agent is run in headless mode. `create_runtime` is typically called within evaluation scripts,
where we don't want to have the VSCode UI open, so it defaults to True.
"""
@@ -105,6 +106,8 @@ async def run_controller(
Args:
config: The app config.
initial_user_action: An Action object containing initial user input
sid: (optional) The session id. IMPORTANT: please don't set this unless you know what you're doing.
Set it to incompatible value will cause unexpected behavior on RemoteRuntime.
runtime: (optional) A runtime for the agent to run on.
agent: (optional) A agent to run.
exit_on_message: quit if agent asks for a message from user (optional)

View File

@@ -199,7 +199,7 @@ async def process_issue(
)
config.set_llm_config(llm_config)
runtime = create_runtime(config, sid=f'{issue.number}')
runtime = create_runtime(config)
await runtime.connect()
async def on_event(evt):