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 e131f63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/samplers/ctpe/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _build_parzen_estimators_for_constraints_and_get_quantiles(
mpes_above: list[_ParzenEstimator] = []
quantiles: list[float] = []
for constraint_vals in constraints_vals.T:
is_satisfied = constraint_vals <= 0
is_satisfied = (constraint_vals <= 0) | (constraint_vals == min(constraint_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 e131f63

Please sign in to comment.