From 963cf13f36bfee7028b776e11f8f93c677e7ace3 Mon Sep 17 00:00:00 2001 From: "Gabriel J. Soto" Date: Thu, 15 Aug 2024 08:51:35 -0600 Subject: [PATCH] fixed conflicts in template driver between debug and opt modes --- templates/template_driver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/template_driver.py b/templates/template_driver.py index cdac25a3..ff7b3efc 100644 --- a/templates/template_driver.py +++ b/templates/template_driver.py @@ -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', @@ -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']")