Skip to content

Commit

Permalink
Reset some turbo fields before starting new run
Browse files Browse the repository at this point in the history
  • Loading branch information
zhe-slac committed Feb 1, 2025
1 parent 91b0b25 commit e98bf6b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/badger/gui/acr/components/routine_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,25 @@ def _compose_routine(self) -> Routine:
# Patch the BO generators to turn on TuRBO by default
if "turbo_controller" not in generator_params:
generator_params["turbo_controller"] = "optimize"

# Nullify a few properties in turbo that can cause issues
turbo_config = generator_params["turbo_controller"]
if type(turbo_config) is dict:
if turbo_config["name"] == "optimize":
try:
turbo_config["center_x"] = None
except KeyError:
pass
try:
turbo_config["best_value"] = None
except KeyError:
pass
elif turbo_config["name"] == "safety":
try:
turbo_config["center_x"] = None
except KeyError:
pass

env_params = load_config(self.env_box.edit.toPlainText())

# VOCS
Expand Down

0 comments on commit e98bf6b

Please sign in to comment.