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

Warn user if resampling for bounds takes too long in ESs #462

Merged
merged 5 commits into from Mar 14, 2024

Conversation

btjanaka
Copy link
Member

Description

A common error when using bounds is that CMA-ES or another ES can hang due to resampling, as solutions that fall outside of the bounds need to be resampled until they are within bounds. This PR adds a warning so that users will at least know that this behavior is occurring. We are still unclear how to deal with bounds properly, as it is also an open research question. #392 has proposed clipping the solutions after a set number of iterations of resampling but it is unclear if this is the best solution.

TODO

  • Fix slight issue with how OpenAI-ES handles resampling
  • Add tests -> since this behavior is supposed to make the tests hang, we just put this as a script in one of the tests that can be manually run
  • Modify ESs

Status

  • I have read the guidelines in
    CONTRIBUTING.md
  • I have formatted my code using yapf
  • I have tested my code by running pytest
  • I have linted my code with pylint
  • I have added a one-line description of my change to the changelog in
    HISTORY.md
  • This PR is ready to go

@btjanaka btjanaka merged commit d087d91 into master Mar 14, 2024
18 checks passed
@btjanaka btjanaka deleted the bound-warning branch March 14, 2024 09:31
btjanaka added a commit that referenced this pull request Mar 14, 2024
## Description

<!-- Provide a brief description of the PR's purpose here. -->

A common error when using bounds is that CMA-ES or another ES can hang
due to resampling, as solutions that fall outside of the bounds need to
be resampled until they are within bounds. This PR adds a warning so
that users will at least know that this behavior is occurring. We are
still unclear how to deal with bounds properly, as it is also an open
research question. #392 has proposed clipping the solutions after a set
number of iterations of resampling but it is unclear if this is the best
solution.

## TODO

<!-- Notable points that this PR has either accomplished or will
accomplish. -->

- [x] Fix slight issue with how OpenAI-ES handles resampling
- [x] Add tests -> since this behavior is supposed to make the tests
hang, we just put this as a script in one of the tests that can be
manually run
- [x] Modify ESs

## 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant