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

A typo in controllers.py #175

Closed
yufei11xyz opened this issue Feb 22, 2024 · 2 comments
Closed

A typo in controllers.py #175

yufei11xyz opened this issue Feb 22, 2024 · 2 comments

Comments

@yufei11xyz
Copy link

Hi there,
Thanks for your work.

In controllers.py, I find a typo on line 475 of controllers.py, which should be self.max_boundary.
image

@yufei11xyz
Copy link
Author

In addition, in learners.py:

Line 576, I think a shallow copy "self.init_simplex_corner=copy.copy(self.min_boundary)" is expected. In this case, the update of self.init_simplex_corner in Line 578 will not affect "self.min_boundary". Otherwise, when simply using "self.init_simplex_corner=self.min_boundary", the value of min_boundary is changed with the update of "self.init_simplex_corner".
image

zakv added a commit to zakv/M-LOOP that referenced this issue Feb 25, 2024
As pointed out in michaelhush#175, the way `self.init_simplex_corner` is created for `NelderMeadLearner` is problematic because it is set equal to `self.min_boundary`. This means that when `self.init_simplex_corner` is later modified, `self.min_boundary` is modified as well. This PR resolves the issue using the approach suggested in michaelhush#175, namely by assigning a copy of `self.min_boundary` to `self.init_simplex_corner` rather than assigning the original array itself.
zakv added a commit that referenced this issue Feb 25, 2024
As pointed out in #175, the way `self.init_simplex_corner` is created for `NelderMeadLearner` is problematic because it is set equal to `self.min_boundary`. This means that when `self.init_simplex_corner` is later modified, `self.min_boundary` is modified as well. This PR resolves the issue using the approach suggested in #175, namely by assigning a copy of `self.min_boundary` to `self.init_simplex_corner` rather than assigning the original array itself.
@zakv
Copy link
Collaborator

zakv commented Feb 25, 2024

Good catches! These have now been fixed by #176 and #177. Thanks for the helpful and detailed bug report!

@zakv zakv closed this as completed May 11, 2024
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

No branches or pull requests

2 participants