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
Implement CMA-MAE archive thresholds #256
Conversation
We ran
Since this is consistent with the results in #220 (comment), we verify that our new implementation of |
if not already_occupied:
threshold_values[new_index] = threshold_floor
# Update the threshold for this cell by the learning rate.
old_threshold = threshold_values[new_index]
if (not already_occupied or old_thresh < new_objective_value or
objective_values[new_index] < new_objective_value):
# ...
# Update the threshold if the threshold will increase.
if old_thresh < new_objective_value:
# ...
# ...
# ...
value = objective_value - old_threshold A problem with the orignial code is that How it affects us?However, the code above will break as |
96e3667
to
393b0ea
Compare
…pyribs into implement-archive-thresholds
…pyribs into implement-archive-thresholds
…pyribs into implement-archive-thresholds
…pyribs into implement-archive-thresholds
To determine performance loss, I tested CMA-ME with improvement ranking both on master and on this branch ( Master: 76.94 sec Thus, we did not lose any significant performance in terms of wallclock time with this PR. It's a bit harder to tell if CMA-MAE is doing alright in terms of time -- it's going to take twice as long just because it is inserting into two archives, and there are also threshold computations which occupy some time. Furthermore, CMA-MAE runs with different hyperparameters than CMA-ME does. Nevertheless, I'll note that running |
Description
In this PR, we modify archive_base to implement archive thresholds from CMA-MAE.
In addition to that, we also revive old implementation of
add_single
, which was removed in (#221) in favor of callingadd
with an array of a single element. We found it necessary to revive the old implementation so users of pyribs can easily "hack" the add_single function to use their own implementation. Otherwise, the users will either have to come up with their own implementation ofadd_single
, or understand (and "hack") the much more complicatedadd
function.In #221 (comment), it was mentioned that
add_batch
without numba gives roughly 2x speed increase overadd_single
with numba. Since we did not revive the use of numba inadd_single
,add_batch
now has a roughly 2.5x - 3x speed increase overadd_single
. For example,cma_me_imp
takes ~100s on my computer withadd_batch
and ~300s withadd_single
.TODO
add_single
in Implement batch addition in archives #221.add_single
.add
.Testing
threshold_min
.sphere.py
test.add_single
andadd
test with different learning rates.Status
yapf
pytest
pylint
HISTORY.md