Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kstone40 committed Aug 21, 2024
2 parents 78a311e + f88ee78 commit f14dd3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions obsidian/optimizer/bayesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ def _validate_hypers(self,
if hps.get(key) is None:
if not defaults['optional']:
raise ValueError(f'Must specify hyperpameter value {key} for {aq_str}')
if key in ['weights']: #['scalarization_weights', 'weights']:
aq_hps[key] = defaults['val'] * o_dim
if key in ['weights', 'scalarization_weights']:
aq_hps[key] = [1] * o_dim
else:
aq_hps[key] = defaults['val']

Expand Down Expand Up @@ -553,7 +553,7 @@ def _parse_aq_kwargs(self,

if aq == 'NParEGO':
w = hps['scalarization_weights']
if isinstance(w,list):
if isinstance(w, list):
w = torch.tensor(w)
w = w/torch.sum(torch.abs(w))
aq_kwargs['scalarization_weights'] = w
Expand Down

0 comments on commit f14dd3a

Please sign in to comment.