Skip to content

Commit

Permalink
fixed conflicts in template driver between debug and opt modes
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielSoto-INL committed Aug 15, 2024
1 parent bd184ba commit 963cf13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/template_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def _modify_outer_samplers(self, template, case, components):
dist, xml = self._create_new_sweep_capacity(name, var_name, vals, sampler)
dists_node.append(dist)
# Bayesian Optimizer requires additional modification
if case.get_opt_strategy() == 'BayesianOpt' and case.get_mode() == 'opt':
if case.get_opt_strategy() == 'BayesianOpt' and case.get_mode() == 'opt' and (not case.debug['enabled']):
xml.remove(xml.find('initial'))
samps_node.append(xml)
grid_node = xmlUtils.newNode('grid', text='0 1',
Expand Down Expand Up @@ -719,7 +719,7 @@ def _modify_outer_optimizers(self, template, case):
"""
# Setting base outer for opt based on optimizer used
strategy = case.get_opt_strategy()
if case.get_mode() == 'opt':
if case.get_mode() == 'opt'and (not case.debug['enabled']):
# Strategy tells us which optimizer to use
if strategy == 'BayesianOpt':
opt_node = template.find('Optimizers').find(".//BayesianOptimizer[@name='cap_opt']")
Expand Down

0 comments on commit 963cf13

Please sign in to comment.