Skip to content

Conversation

ArturNiederfahrenhorst
Copy link
Contributor

Why are these changes needed?

Changes should have been part of #56953.
The reason we did #56930 and #56953, was that any kind of task would always be tagged and therefore limited per actor/type of task.

if num_healthy_remote_workers > 0:
async_results = self.env_runner_group.foreach_env_runner_async_fetch_ready(
func="sample_get_state_and_metrics",
tag="sample_get_state_and_metrics",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not the reason for this PR, just an addition I picked up on the way.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds tagging to set_state calls to enable limiting in-flight requests, which is a good step towards better resource management. The changes in rllib/algorithms/impala/impala.py are correct. However, in rllib/env/env_runner_group.py, the switch from synchronous to asynchronous calls introduces a few issues. For sync_env_runner_states, a more efficient fire-and-forget method is available. More critically, for sync_weights, the change alters the waiting behavior of timeout_seconds, which could lead to unexpected behavior if callers rely on its previous synchronous nature. I've added specific comments with suggestions.

@ray-gardener ray-gardener bot added the rllib RLlib related issues label Oct 12, 2025
@ArturNiederfahrenhorst ArturNiederfahrenhorst added the go add ONLY when ready to merge, run all tests label Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests rllib RLlib related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants