-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tune] Remove rllib dep again, and add a test #1792
Conversation
what was the current issue? don't the failed imports get caught in |
Oh, it looks like the try catch is gone there. Hm, we could put it back, but this is probably a cleaner fix. |
Test FAILed. |
Test PASSed. |
Test PASSed. |
python/ray/tune/trial.py
Outdated
raise TuneError("Unknown trainable: " + trainable_name) | ||
if not has_trainable(trainable_name): | ||
# Make sure rllib agents are registered | ||
from ray import rllib # noqa # pylint: disable=unused-import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, the comment should just be # noqa: F401
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
@@ -0,0 +1,26 @@ | |||
#!/usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine if this is the only thing that's ever going to be in this test file. However in general new tests should all use pytest
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this one kinda has to be its own file since it tests import state.
Test PASSed. |
What do these changes do?
Load rllib as late as possible and only if needed (for RLlib agents). Add a test to make sure this doesn't regress again.
cc @vlad17