Skip to content
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

Merged
merged 22 commits into from
Jan 25, 2018
Merged

[tune] Ray Tune API cleanup #1454

merged 22 commits into from
Jan 25, 2018

Conversation

ericl
Copy link
Contributor

@ericl ericl commented Jan 23, 2018

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

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3341/
Test FAILed.

Copy link
Contributor

@richardliaw richardliaw left a 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({
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3342/
Test FAILed.

Copy link
Contributor

@richardliaw richardliaw left a 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

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3343/
Test PASSed.

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3344/
Test PASSed.

@ericl ericl changed the title [tune] Move ray.init() out of run_experiments() [tune] Remove rllib dep, clean up hyperband, and move ray.init() out of run_experiments() Jan 23, 2018
@ericl ericl changed the title [tune] Remove rllib dep, clean up hyperband, and move ray.init() out of run_experiments() [tune] Remove rllib dep, clean up hyperband, remove YAML api, and move ray.init() out of run_experiments() Jan 23, 2018
@ericl ericl changed the title [tune] Remove rllib dep, clean up hyperband, remove YAML api, and move ray.init() out of run_experiments() [tune] Ray Tune API cleanup Jan 23, 2018
@ericl
Copy link
Contributor Author

ericl commented Jan 23, 2018

Sorry for merging the other PR here, thought that was best since Travis isn't very happy right now.

@@ -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:
Copy link
Contributor Author

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.

Copy link
Contributor

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..

Copy link
Contributor Author

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.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3354/
Test FAILed.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3355/
Test FAILed.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3357/
Test FAILed.

@AmplabJenkins
Copy link

Build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3360/
Test FAILed.

@AmplabJenkins
Copy link

Build finished. Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3359/
Test PASSed.

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3364/
Test PASSed.

@@ -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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@richardliaw richardliaw left a comment

Choose a reason for hiding this comment

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

overall lgtm

@richardliaw
Copy link
Contributor

trial_runner_test.py is erroring

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3382/
Test FAILed.

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3381/
Test PASSed.

@ericl
Copy link
Contributor Author

ericl commented Jan 25, 2018

Builds look good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants