Skip to content

Commit

Permalink
variable pi not assigned
Browse files Browse the repository at this point in the history
  • Loading branch information
tjs-intel committed May 15, 2024
1 parent 85619c1 commit 80b0af3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libsigopt/compute/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
@dataclass(frozen=True, slots=True)
class SearchCoreComponents:
search_points_to_evaluate: numpy.ndarray
pi: numpy.ndarray
pi_grad: numpy.ndarray
pi: numpy.ndarray | None
pi_grad: numpy.ndarray | None


class FakePredictor(Predictor):
Expand Down Expand Up @@ -66,6 +66,7 @@ def compute_core_components(self, points_to_evaluate, option):
assert len(eval_shape) == 2 and eval_shape[1] == self.dim
search_points_to_evaluate = convert_one_hot_to_search_hypercube_points(self.domain, points_to_evaluate)
pi_grad = None
pi = None
if option in ("func",):
pi = self.failure_model.compute_probability_of_success(points_to_evaluate)
return SearchCoreComponents(search_points_to_evaluate, pi, pi_grad)
Expand Down

0 comments on commit 80b0af3

Please sign in to comment.