Skip to content

Commit

Permalink
Add the constraint split for no feasible observations
Browse files Browse the repository at this point in the history
  • Loading branch information
nabenabe0928 committed Dec 4, 2024
1 parent 64f5998 commit 41803cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/samplers/ctpe/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def _build_parzen_estimators_for_constraints_and_get_quantiles(
mpes_below: list[_ParzenEstimator] = []
mpes_above: list[_ParzenEstimator] = []
quantiles: list[float] = []
for constraint_vals in constraints_vals.T:
is_satisfied = constraint_vals <= 0
for cstr_vals in constraints_vals.T:
is_satisfied = np.logical_or(cstr_vals <= 0, cstr_vals == max(cstr_vals))
satisfied_trials = [t for t, include in zip(trials, is_satisfied) if include]
unsatisfied_trials = [t for t, exclude in zip(trials, is_satisfied) if not exclude]
mpes_below.append(
Expand Down

0 comments on commit 41803cc

Please sign in to comment.