diff --git a/deephyper_benchmark/search/_mpi_doptuna.py b/deephyper_benchmark/search/_mpi_doptuna.py index 9612e5a..0896e76 100644 --- a/deephyper_benchmark/search/_mpi_doptuna.py +++ b/deephyper_benchmark/search/_mpi_doptuna.py @@ -283,7 +283,7 @@ def objective_wrapper(trial): # Constraints which are considered feasible if less than or equal to zero. constraints = [] for i, lbi in enumerate(self._moo_lower_bounds): - if lbi is not None: + if lbi is not None and type(output["objective"][i]) is not str: ci = -(output["objective"][i] - lbi) # <= 0 constraints.append(ci) trial.set_user_attr("constraints", tuple(constraints))