Skip to content

Conversation

@pseudo-rnd-thoughts
Copy link
Member

Description

Checking RLlib, there are a couple cases where we don't fully handle exception cases.
I've checked every try except statement in RLlib and this PR updates all of them that didn't log or print the error if it wasn't handled

Related issues

Fixes #58854

@pseudo-rnd-thoughts pseudo-rnd-thoughts requested a review from a team as a code owner November 21, 2025 11:31
@pseudo-rnd-thoughts pseudo-rnd-thoughts added the rllib RLlib related issues label Nov 21, 2025
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 improves error handling by logging or re-raising exceptions that were previously being ignored. This is a great change for improving the debuggability of RLlib. The changes are in the right direction. I've added a few comments with suggestions to use the logging module consistently instead of print, and to use logger.exception in a more idiomatic way.

@pseudo-rnd-thoughts pseudo-rnd-thoughts added the go add ONLY when ready to merge, run all tests label Nov 21, 2025
Signed-off-by: Mark Towers <[email protected]>
Copy link
Contributor

@ArturNiederfahrenhorst ArturNiederfahrenhorst left a comment

Choose a reason for hiding this comment

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

Nice! What do you think about putting some more information into the error that pops up when we can't solve references?

This kind of errors comes up a lot when using spot instances and we should ensure that users are not alarmed each time they discover this log message.

Signed-off-by: Mark Towers <[email protected]>
Copy link
Contributor

@ArturNiederfahrenhorst ArturNiederfahrenhorst left a comment

Choose a reason for hiding this comment

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

Thanks!

@ArturNiederfahrenhorst ArturNiederfahrenhorst merged commit fb7c6f3 into ray-project:master Nov 27, 2025
6 checks passed
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.

RLlib: RLModule swallows AttributeError

2 participants