Skip to content

Commit

Permalink
Update recipes/007_benchmarks_advanced.py
Browse files Browse the repository at this point in the history
Co-authored-by: Shuhei Watanabe <[email protected]>
  • Loading branch information
y0z and nabenabe0928 authored Dec 17, 2024
1 parent 4c8f368 commit 2394c0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion recipes/007_benchmarks_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def evaluate(self, params: dict[str, float]) -> float:
# The ``evaluate_constraints`` method evaluates the constraint functions given a dictionary of input parameters and returns a list of constraint values.
# Then, ``ConstrainedMixin`` internally defines the ``constraints_func`` method for Optuna samplers.
class ConstrainedProblem(ConstrainedMixin, DynamicProblem):
def evaluate_constraints(self, params: dict[str, float]) -> list[float]:
def evaluate_constraints(self, params: dict[str, float]) -> tuple[float]:
x = params["x"]
c0 = x - 2
if "y" not in params:
Expand Down

0 comments on commit 2394c0b

Please sign in to comment.