-
Notifications
You must be signed in to change notification settings - Fork 356
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
Optimization methods specifically for RL #1273
Closed
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5113452
Update optimizerlib.py
teytaud 1199cea
record
teytaud 0a0b9e4
rl
teytaud cb4ac62
Update recorded_recommendations.csv
teytaud 7a23928
Update optimizerlib.py
teytaud 3a35787
better recom for chaining: follow the last optimization method
teytaud 9cee7cf
fix_typing
teytaud 296f64f
Update optimizerlib.py
teytaud f069c6d
Update recorded_recommendations.csv
teytaud 62eb584
fix
teytaud eb76921
Merge branch 'main' into for_rl
teytaud 090ce00
Merge branch 'main' of github.com:facebookresearch/nevergrad into for_rl
teytaud File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2059,6 +2059,9 @@ def _internal_tell_candidate(self, candidate: p.Parameter, loss: tp.FloatLoss) - | |
if self.num_tell < sum_budget: | ||
opt.tell(candidate, loss) | ||
|
||
def _internal_provide_recommendation(self) -> tp.ArrayLike: | ||
return self.optimizers[-1]._internal_provide_recommendation() # type: ignore | ||
|
||
|
||
class Chaining(base.ConfiguredOptimizer): | ||
""" | ||
|
@@ -2087,6 +2090,10 @@ def __init__( | |
GeneticDE = Chaining([RotatedTwoPointsDE, TwoPointsDE], [200]).set_name( | ||
"GeneticDE", register=True | ||
) # Also known as CGDE | ||
MixDeterministicRL = ConfPortfolio(optimizers=[DiagonalCMA, PSO, GeneticDE]).set_name( | ||
"MixDeterministicRL", register=True | ||
) | ||
SpecialRL = Chaining([MixDeterministicRL, TBPSA], ["half"]).set_name("SpecialRL", register=True) | ||
ChainCMAPowell = Chaining([CMA, Powell], ["half"]).set_name("ChainCMAPowell", register=True) | ||
ChainCMAPowell.no_parallelization = True # TODO make this automatic | ||
ChainMetaModelSQP = Chaining([MetaModel, SQP], ["half"]).set_name("ChainMetaModelSQP", register=True) | ||
|
@@ -2760,3 +2767,6 @@ def __init__( | |
base_optimizer: base.OptCls = NGOpt, | ||
) -> None: | ||
super().__init__(_MSR, locals()) | ||
|
||
|
||
NGOptRL = SpecialRL | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather we keep one name only if possible, why have two names for now? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we need both?