-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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] Ray Tune API cleanup #1454
Conversation
Merged build finished. Test FAILed. |
Test FAILed. |
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.
There are quite a few mentions of run_experiments
in the CARLA examples...
@@ -30,6 +31,7 @@ Getting Started | |||
|
|||
register_trainable("my_func", my_func) | |||
|
|||
ray.init() | |||
run_experiments({ |
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.
I believe you need to modify rllib.rst
too
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.
Fixed
Merged build finished. Test FAILed. |
Test FAILed. |
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.
One last one... examples/custom_env/custom_env.py
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Sorry for merging the other PR here, thought that was best since Travis isn't very happy right now. |
python/ray/tune/hyperband.py
Outdated
@@ -295,7 +297,9 @@ def current_trials(self): | |||
|
|||
def continue_trial(self, trial): | |||
result = self._live_trials[trial] | |||
if self._get_result_time(result) < self._cumul_r: | |||
if self._get_result_time(result) > self._max_t: |
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.
@richardliaw is this the right way to limit to max t? If not we can leave it for another pr.
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.
it's a little bit more involved than this..
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.
Ok, let me revert this then.
Test FAILed. |
Merged build finished. Test FAILed. |
Test FAILed. |
Merged build finished. Test FAILed. |
Test FAILed. |
Build finished. Test FAILed. |
Test FAILed. |
Build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
python/ray/tune/tune.py
Outdated
@@ -30,6 +30,9 @@ def _make_scheduler(args): | |||
|
|||
|
|||
def run_experiments(experiments, scheduler=None): | |||
# 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.
Does this make sense? We should probably only import if flagged.
One problem here is that the teaser example in http://ray.readthedocs.io/en/latest/tune.html
calls run_experiments
, and nowhere do we list the rllib dependencies, so the user will probably get a bunch of installation errors in trying to run the simplest example.
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.
Importing rllib actually does not have any hard dependencies -- if some dependency is not installed you just get a warning on the console.
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.
OK, I see. I'm trying to import run_experiments
on a clean env.
I'm getting an import error telling me that I still need to install TensorFlow (for the Logger) - this should be documented somewhere. Could also just disable the TensorBoard logger if Tensorflow not installed. This can be done on a separate PR (or in the current one)
Also, if a user is trying to use tune
out of the box (say for HyperBand), it probably makes sense to preface the warnings with something like Trying to import default rllib agents...
instead of a sudden block of warnings.
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.
That's fine for now, we can improve this in a separate PR.
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.
overall lgtm
|
Merged build finished. Test FAILed. |
Test FAILed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Builds look good. |
What do these changes do?
Remove rllib dep: trainable is now a standalone abstract class that can be easily subclassed.
Clean up hyperband: fix debug string and add an example.
Remove YAML api / ScriptRunner: this was never really used.
Move ray.init() out of run_experiments(): This provides greater flexibility and should be less confusing since there isn't an implicit init() done there. Note that this is a breaking API change for tune.
Related issue number
#1429