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] Support initial parameters for SkOpt search algorithm #4341

Merged
merged 15 commits into from
Mar 17, 2019

Conversation

markgoodhead
Copy link
Contributor

What do these changes do?

Similar to the recent change to HyperOpt (##3944) this implements both:

  1. The ability to pass in initial parameter suggestion(s) to be run through Tune first, before using the Optimiser's suggestions. This is for when you already know good parameters and want the Optimiser to be aware of these when it makes future parameter suggestions.
  2. The same as 1. but if you already know the reward value for those parameters you can pass these in as well to avoid having to re-run the experiments. In the future it would be nice for Tune to potentially support this functionality directly by loading previously run Tune experiments and initialising the Optimiser with these (kind of like a top level checkpointing functionality) but this feature allows users to do this manually for now.

@richardliaw
Copy link
Contributor

cc @adizim, can you review this PR? It is based off of your previous contribution to the SkOpt search algorithm component.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@adizim
Copy link
Contributor

adizim commented Mar 12, 2019

I left a few suggestions. I see you have tested the example case with points_to_evaluate and evaluated_rewards set. Similarly, can you see that the example without evaluated_rewards set works, to cover all cases?

@richardliaw
Copy link
Contributor

BTW @markgoodhead, thanks for this contribution!

In the future it would be nice for Tune to potentially support this functionality directly by loading previously run Tune experiments and initialising the Optimiser with these (kind of like a top level checkpointing functionality) but this feature allows users to do this manually for now.

BTW, this should work soon, and the relevant PRs should be #4234 and #3709.

@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/12793/
Test PASSed.

@adizim
Copy link
Contributor

adizim commented Mar 12, 2019

I wrote up my suggestions in #4345

@markgoodhead
Copy link
Contributor Author

markgoodhead commented Mar 13, 2019

I wrote up my suggestions in #4345

Hi @adizim - thanks for the review! I'm a little confused as to what branch you'd like me to implement the changes off as #4345 has been closed and I also see you made a PR into my branch (which contains a lot of other changes besides your tweaks so I think muddies the PR too much) - what way would you like me to proceed from here?

EDIT: Never mind I worked it out that the other changes are just due to me being very behind master - I've merged your branch and will do the other changes you suggest 😄

EDIT2: OK actually it looks like there's some other changes in there that's unrelated to this PR @adizim - mainly in python/ray/rllib/tests/test_lstm.py - are you working on these changes elsewhere that need to be merged into master first? Are you happy for them to go in via my branch?

Update on support initial parameters for SkOpt
@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/12846/
Test FAILed.

…the skopt example to run both with and without known_rewards
@markgoodhead
Copy link
Contributor Author

@richardliaw @adizim I've made all the requested changes after merging @adizim 's branch. This PR now has some random RLLib changes in so not sure what you want to do about that but otherwise it's good to go.

@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/12847/
Test FAILed.

@adizim
Copy link
Contributor

adizim commented Mar 13, 2019

@markgoodhead Apologies for the extraneous changes, I did not mean to include them, I hope they didn't cause too much confusion. @richardliaw was able to revert them just recently.

@markgoodhead The changes look good to me, though it would be helpful to keep the error messages you wrote. Raising TypeErrors with the error messages should be the correct approach. You can also include the error messages in the assertions as they stand now.

@adizim
Copy link
Contributor

adizim commented Mar 13, 2019

@markgoodhead Nevermind, @richardliaw took care of the error messages

@richardliaw richardliaw self-assigned this Mar 13, 2019
@richardliaw
Copy link
Contributor

jenkins retest this please

@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-Perf-Integration-PRB/83/
Test PASSed.

@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/12870/
Test FAILed.

@richardliaw
Copy link
Contributor

jenkins retest this please

@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-Perf-Integration-PRB/84/
Test PASSed.

@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/12880/
Test FAILed.

…ed to length of parameter_names (number of parameter dimensions). Fixed this comparion and also fixed the points_to_evaluate and evaluated_rewards comparison
@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/12895/
Test FAILed.

@markgoodhead
Copy link
Contributor Author

Why do the tests keep failing?

@richardliaw
Copy link
Contributor

richardliaw commented Mar 15, 2019 via email

@richardliaw
Copy link
Contributor

This runs locally.

@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/12917/
Test FAILed.

@richardliaw richardliaw merged commit 20a155d into ray-project:master Mar 17, 2019
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.

4 participants