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

Sporadic "out of bounds"-error in smbo for very large search-spaces #43

Open
SimonBlanke opened this issue Jan 11, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@SimonBlanke
Copy link
Owner

There appears to be a bug in the initial sampler of the sequence-model-based optimization algorithms that only occurs in the "test_large_search_space.py"-tests. This is the error:

gradient_free_optimizers/search.py:96: in search
    self.search_step(nth_trial)
gradient_free_optimizers/search.py:185: in search_step
    self.finish_initialization()
gradient_free_optimizers/optimizers/global_opt/lipschitz_optimization.py:59: in finish_initialization
    self.all_pos_comb = self._all_possible_pos()
gradient_free_optimizers/optimizers/smb_opt/smbo.py:112: in _all_possible_pos
    if self.conv.not_in_constraint(pos):
gradient_free_optimizers/optimizers/core_optimizer/converter.py:59: in not_in_constraint
    para = self.value2para(self.position2value(position))
gradient_free_optimizers/optimizers/core_optimizer/converter.py:72: in wrapper
    return func_(self, *args)


    @returnNoneIfArgNone
    def position2value(self, position: Optional[list]) -> Optional[list]:
        value = []
    
        for n, space_dim in enumerate(self.search_space_values):
>           value.append(space_dim[position[n]])
E           IndexError: index 201 is out of bounds for axis 0 with size 100

gradient_free_optimizers/optimizers/core_optimizer/converter.py:81: IndexError

For some reason this error started to appear after switching from python 3.8 to 3.10 on my local machine.

It is strange, that this error never occurred in the CI. And I have no idea, why this was no problem in python 3.8, since the methgrid-method (which is important for the position generation in the algorithm) has not changed its behaviour (as far as I can tell).

@SimonBlanke SimonBlanke added the bug Something isn't working label Jan 11, 2024
@SimonBlanke SimonBlanke self-assigned this Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant