Skip to content

Commit

Permalink
als tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
taxe10 committed Nov 9, 2023
1 parent e3e18e5 commit 440bc16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions bloptools/bayesian/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,13 @@ def pseudo_targets(self):
"""Targets for the posterior transform"""
return torch.tensor(
[
self.objectives_targets[..., i].max()
if t == "max"
else self.objectives_targets[..., i].min()
if t == "min"
else t
for i, t in enumerate(self.objectives.targets)
1.e32
if obj.target == "max"
else -1.e32
if obj.target == "min"
else np.log(obj.target) if obj.log
else obj.target
for i, obj in enumerate(self.objectives)
]
)

Expand Down
2 changes: 1 addition & 1 deletion bloptools/bayesian/objectives.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
numeric = Union[float, int]

DEFAULT_MINIMUM_SNR = 1e1
OBJ_FIELDS = ["description", "limits", "weight", "minimize", "log", "n", "snr", "min_snr"]
OBJ_FIELDS = ["description", "target", "limits", "weight", "log", "n", "snr", "min_snr"]


class DuplicateNameError(ValueError):
Expand Down

0 comments on commit 440bc16

Please sign in to comment.