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

Add GradientEmitter to support OMG-MEGA and OG-MAP-Elites #348

Merged
merged 55 commits into from
Sep 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
0e85f88
swap out mp for dask
yutaizhou Aug 21, 2023
da408da
add to history.md
yutaizhou Aug 21, 2023
873c834
Replace multiprocessing text
btjanaka Aug 21, 2023
28e5aca
add dask distributed to pip install list
yutaizhou Aug 21, 2023
22bbceb
install swig on separate line
yutaizhou Aug 21, 2023
34f58bb
edit history.md to include swig, and clean up imports in tutorial
yutaizhou Aug 21, 2023
817f246
take out dask call to LocalCluster
yutaizhou Aug 21, 2023
04e919e
Update HISTORY.md
btjanaka Aug 21, 2023
aead9da
Remove LocalCluster
btjanaka Aug 21, 2023
15f5a70
Note import
btjanaka Aug 21, 2023
dc15b4a
Revert image
btjanaka Aug 21, 2023
2a48e73
Update lunar_lander.ipynb
btjanaka Aug 21, 2023
5f3797b
grokked the pyribs dqd interface. starting to add functions for OMG-MEGA
yutaizhou Aug 22, 2023
21ef8e0
added omg-mega to test and import, first pass at {ask/tell}_dqd()
yutaizhou Aug 23, 2023
9a733c5
passed sphere archive coverage test. need to debug QD score being sup…
yutaizhou Aug 23, 2023
091c317
OG-MAP-Elites added
yutaizhou Aug 23, 2023
989cdcd
Merge branch 'omg-mega/emitter' of github.com:yutaizhou/pyribs into o…
yutaizhou Aug 23, 2023
7a5594c
more properties to make it more 0.5 like
yutaizhou Aug 24, 2023
73fdffc
make gradient_emitter accept initial solutions (xor x0)
yutaizhou Aug 24, 2023
c758bb5
vectorized isolinedd added!
yutaizhou Aug 24, 2023
c2de49d
gradient emitter test!
yutaizhou Aug 25, 2023
5280e9f
documentation for gradient_emitter
yutaizhou Aug 25, 2023
ed93866
forgot history.md
yutaizhou Aug 25, 2023
574c018
Merge branch 'master' into omg-mega/emitter
yutaizhou Aug 25, 2023
6fd5344
Merge remote-tracking branch 'remotes/upstream/master' into omg-mega/…
yutaizhou Sep 9, 2023
cc9fc68
updated HISTORY to reflect GradientEmitter
yutaizhou Sep 9, 2023
8786462
use np clip instead of max and min for noise clipping
yutaizhou Sep 9, 2023
2209f41
updated docstring for the various sigmas
yutaizhou Sep 9, 2023
c750067
updated docstring for iterations and ask_dqd() not returning just one…
yutaizhou Sep 9, 2023
fff7ff1
updated docstring for tell_dqd, particularly on jacobian batch shape
yutaizhou Sep 9, 2023
ea5b3cd
GradientOperator -> GradientOperatorEmitter
yutaizhou Sep 9, 2023
428286a
asarray validate for jacobian_batch. and don't use np.multiply
yutaizhou Sep 9, 2023
2d3c97e
extended docstring added
yutaizhou Sep 9, 2023
a866f1e
Merge branch 'master' into omg-mega/emitter
btjanaka Sep 10, 2023
d40d881
history
btjanaka Sep 10, 2023
9c1b575
Update call to validate_batch_args
btjanaka Sep 10, 2023
7609425
Make isort line length be 80 to match yapf
btjanaka Sep 10, 2023
dcb7a31
Remove yapf disable
btjanaka Sep 10, 2023
70c91a1
Fix pylint error in sphere.py
btjanaka Sep 10, 2023
1632a03
Add period
btjanaka Sep 10, 2023
b19d1cb
Add GradientOperatorEmitter to list in emitter docs
btjanaka Sep 10, 2023
f325be5
Comment on batch size
btjanaka Sep 10, 2023
608132a
Docstring edits
btjanaka Sep 10, 2023
32f8ef7
fix link to tell_dqd
btjanaka Sep 10, 2023
68f36f7
no default values for sigma0 and sigma_g. also take out shape checkin…
yutaizhou Sep 14, 2023
51ea8c5
sigma0 to sigma, changed pytest fname to reflect new classname for gr…
yutaizhou Sep 14, 2023
5fb221c
take out linebreak
yutaizhou Sep 15, 2023
ffc81c9
updated docstring for gradientOperator
yutaizhou Sep 21, 2023
51d4339
Merge branch 'omg-mega/emitter' of github.com:yutaizhou/pyribs into o…
btjanaka Sep 21, 2023
7ce06aa
Add see also to gradient arborescence emitter
btjanaka Sep 21, 2023
37b7ed5
Update leading docstring
btjanaka Sep 21, 2023
13b008f
Update top line
btjanaka Sep 21, 2023
1313a2f
Merge branch 'master' into omg-mega/emitter
btjanaka Sep 21, 2023
dedeb9d
Move history to new version
btjanaka Sep 21, 2023
0a125d7
isolinedd docstring
yutaizhou Sep 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions ribs/emitters/_gradient_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ def ask(self):
"""Samples new solutions from a gradient arborescence parameterized by a
multivariate Gaussian distribution.

The multivariate Gaussian is parameterized by sigma_g.
If measure_gradients is used, the multivariate Gaussian is parameterized
by sigma_g, and the arboresecence coefficient is sampled from the
multivariate Gaussian, with the objective coefficient being always
positive. If measure_gradients is not used, the arboresecence
coefficient is just sigma_g itself.
btjanaka marked this conversation as resolved.
Show resolved Hide resolved

This method returns ``batch_size`` solutions by branching
with gradient arborescence based on the solutions returned by
Expand Down Expand Up @@ -248,21 +252,23 @@ def tell_dqd(self,
status_batch,
value_batch,
metadata_batch=None):
"""Gives the emitter results from evaluating the solutions.
"""Gives the emitter results of evaluating solutions from ask_dqd()

Args:
solution_batch (array-like): (batch_size, :attr:`solution_dim`)
array of solutions generated by this emitter's
:meth:`ask_dqd()` method.
objective_batch (array-like): 1d array containing the objective
function value of each solution.
measures_batch (array-like): (batch_size, measure space dimension)
measures_batch (array-like): (batch_size, measure_dim)
array with the measure space coordinates of each solution.
jacobian_batch (array-like): (batch_size, 1 + measure_dim,
yutaizhou marked this conversation as resolved.
Show resolved Hide resolved
solution_dim) array consisting of Jacobian matrices of the
solutions obtained from :meth:`ask_dqd`. Each matrix should
consist of the objective gradient of the solution followed by
the measure gradients.
If measure gradients are not used, the array is of shape
(batch_size, 1, solution_dim).
status_batch (array-like): 1d array of
:class:`ribs.archive.addstatus` returned by a series of calls
to archive's :meth:`add()` method.
Expand Down