In the following while loop is a check if the loop should be terminated next iteration. But the check is at the beginning of the loop and afterwards another iteration is run. This leads to always computing one iteration too much. The check if the loop should be terminated needs to be at the end of the while loop. Consider the problematic code below:
I think there is a bug in the hypersweeper run function https://github.com/automl/hypersweeper/blob/7b401c4c012d6f857daec07e8f7760679c419eb7/hydra_plugins/hypersweeper/hypersweeper_sweeper.py#L397
In the following while loop is a check if the loop should be terminated next iteration. But the check is at the beginning of the loop and afterwards another iteration is run. This leads to always computing one iteration too much. The check if the loop should be terminated needs to be at the end of the while loop. Consider the problematic code below:
https://github.com/automl/hypersweeper/blob/7b401c4c012d6f857daec07e8f7760679c419eb7/hydra_plugins/hypersweeper/hypersweeper_sweeper.py#L419-L426