Skip to content
Open
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
2 changes: 1 addition & 1 deletion verl/experimental/agent_loop/agent_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def generate(
"""
server = self._choose_server(request_id)
output = await server.generate.remote(
request_id=uuid4().hex, # use new request_id for each turn
request_id=request_id, # use the same request_id for better tracking
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Using the same request_id across multiple turns could lead to issues if the backend relies on unique request_ids for identifying individual requests. This might cause incorrect caching or interference between turns. It's important to ensure that the backend system can handle the same request_id for related turns within a trajectory without any conflicts or errors.

Consider adding a mechanism to ensure uniqueness across different trajectories, perhaps by incorporating a trajectory ID or session ID into the request_id.

Suggested change
request_id=request_id, # use the same request_id for better tracking
request_id=f"{request_id}_turn", # use the same request_id for better tracking

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We better to use new request_id for each turn

prompt_ids=prompt_ids,
sampling_params=sampling_params,
image_data=image_data,
Expand Down