diff --git a/bloptools/bayesian/agent.py b/bloptools/bayesian/agent.py index f3c9c01..24f0aba 100644 --- a/bloptools/bayesian/agent.py +++ b/bloptools/bayesian/agent.py @@ -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) ] ) diff --git a/bloptools/bayesian/objectives.py b/bloptools/bayesian/objectives.py index 3e13978..4eeb8da 100644 --- a/bloptools/bayesian/objectives.py +++ b/bloptools/bayesian/objectives.py @@ -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):