Skip to content

NSGAII Sampler Pareto Front Logic inconsistency #6242

@dan8239

Description

@dan8239

Expected behavior

Looking at the logic on this page, constraint domination should come into consideration for best trials. However, if no feasible trials are found, there are no best_trials returned.

The constraints are handled by the constrained domination. A trial x is said to constrained-dominate a trial y, if any of the following conditions is true:
Trial x is feasible and trial y is not.
Trial x and y are both infeasible, but trial x has a smaller overall violation.
Trial x and y are feasible and trial x dominates trial y.

The trials still dominate one another by the above logic, but the best_trials list is empty. I am having to implement custom logic to get the pareto front of infeasible trials based on this logic above. Shouldn't the best trials pareto front implement the above logic when no feasible trials exist?

Environment

  • Optuna version: 4.4.0
  • Python version: 3.11.9
  • OS: macOS Sonoma v14.4
  • (Optional) Other libraries and their versions:
dbutils~=3.1.1
fastapi[standard]~=0.116.0
numpy~=2.3.1
numpy-financial~=1.0.0
mlflow~=3.2.0
pandas~=2.3.1
python-dateutil~=2.9.0.post0
pyxirr~=0.10.6
ruff==0.12.1
uvicorn~=0.35.0
optuna~=4.4.0
pytest~=8.4.1

Error messages, stack traces, or logs

There aren't any error messages, just an empty list of best_trials.

Steps to reproduce

  1. create a study w/ nsgaii sampler
  2. give impossible constraints to constraint_func
  3. view empty best_trials
# python code

Additional context (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue/PR about behavior that is broken. Not for typos/examples/CI/test but for Optuna itself.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions