Skip to content

Commit 22dc897

Browse files
authored
Handling ordered deprecation (#130)
1 parent b396220 commit 22dc897

File tree

2 files changed

+3
-6
lines changed
  • packages/hotpotqa/src/aviary/envs/hotpotqa
  • src/aviary

2 files changed

+3
-6
lines changed

packages/hotpotqa/src/aviary/envs/hotpotqa/env.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,10 @@ async def step(
310310
self.state.reward = 0.0
311311
response_messages = cast(
312312
Messages,
313-
# Ordered since things like search -> lookup need to be run in order.
313+
# Non-concurrent since things like search -> lookup need to be run in order.
314314
# NOTE: Handling tool exceptions here keeps the trajectory going, but I don't
315315
# think the returned message is useful to the agent/learning. Disabling for now.
316-
await self.exec_tool_calls(
317-
action,
318-
ordered=True,
319-
),
316+
await self.exec_tool_calls(action, concurrency=False),
320317
)
321318
return response_messages, self.state.reward, self.state.done, False
322319

src/aviary/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ async def exec_tool_calls(
166166
Args:
167167
message: ToolRequestMessage containing the tool calls.
168168
concurrency: Flag to set True (default) to concurrently execute tool calls,
169-
otherwise set False to execute tools sequentially.
169+
otherwise set False to execute tool calls in the provided order.
170170
handle_tool_exc: Opt-in flag to suppress Exceptions and return them as a
171171
ToolResponseMessage.
172172
handle_invalid_tool_calls: Flag to handle invalid tool calls by returning

0 commit comments

Comments
 (0)