-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add PyCMAEvolutionStrategy for using pycma in ES emitters #434
Conversation
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
9 tasks
btjanaka
added a commit
that referenced
this pull request
Dec 9, 2023
## Description <!-- Provide a brief description of the PR's purpose here. --> This PR adds the `ranking_values` argument to the tell() method in evolution strategies. This paves the way for #434, since pycma needs the ranking values to be passed into tell(). Note that I considered removing ranking_values from `check_stop` and instead forcing the ES to store its own ranking values like pycma does, but I do not think this is a necessary change. This change is backwards-incompatible, but similar to #436, I do not think it will affect most users. ## TODO <!-- Notable points that this PR has either accomplished or will accomplish. --> - [x] Update EvolutionStrategyBase and corresponding ESs - [x] Update emitter calls - [x] Remove redundant method docstrings ## Questions <!-- Any concerns or points of confusion? --> ## Status - [x] I have read the guidelines in [CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md) - [x] I have formatted my code using `yapf` - [x] I have tested my code by running `pytest` - [x] I have linted my code with `pylint` - [x] I have added a one-line description of my change to the changelog in `HISTORY.md` - [x] This PR is ready to go
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Currently, we only provide our custom implementation of CMA-ES for use with emitters like EvolutionStrategyEmitter. This PR instead makes it possible to use the pycma implementation of CMA-ES, which provides many more features.
In emitters, pycma can now be used by passing
es="pycma_es"
as an argument.pycma can be installed separately with
pip install cma
; this PR also provides an extra for installing it withpip install ribs[pycma]
. I have also addedcma
under theall
extra; I believe it is a good idea to have the pycma extra and have cma under the all extra becausepycma
is fairly stable, so depending on it should be fine.TODO
ribs.emitters.opt
Example Outputs
(These are fairly consistent across runs)
cma_me_imp
(set thees
parameter tocma_es
orpycma_es
inside sphere.py):Our CMA-ES:
With pycma CMA-ES:
Status
CONTRIBUTING.md
yapf
pytest
pylint
HISTORY.md