optuna / optuna

A hyperparameter optimization framework
https://optuna.org
Other
10.14k stars 984 forks source link

Support multi-objective CMA-ES (MOCMAES) sampling algorithm #5375

Open hnanacc opened 3 months ago

hnanacc commented 3 months ago

Motivation

Optuna currently supports only single-objective CMA-ES for sampling, it would be useful to have multi-objective CMA-ES as a lot of tasks need to consider multiple objectives to be optimized together.

This would also be helpful for other HPO/AutoML frameworks that depend on Optuna for their functionality. This issue is particularly motivated from the need to support MOCMAES in kubeflow/katib.

Description

Similar to other multi-objective sampling algorithms, MOCMAES will be able to work with multiple objectives.

# multi-objective function to be optimized.
def multi_objective(trial):
    ...
    return objective_1, objective_2

# use CMA-ES sampler with multi-ojective.
sampler = optuna.samplers.CmaEsSampler()

# specify directions for each objective.
study = optuna.create_study(sampler=sampler, directions=['maximize', 'minimize'])

# execute the optimization process with multi-objective.
study.optimize(multi_objective, n_trials=1000, timeout=1000)

# visualize pareto-front
optuna.visualization.plot_pareto_front(study, target_names=["objective_1", "objective_2"])

Alternatives (optional)

Currently, there are no decent solutions to MOCMAES, which are also maintained in the open-source domain.

Some relevant solutions are chocolate and pycomocma which were both last committed 4 years ago.

An option would be add pycomocma as an optuna-integration and maintain it further.

Additional context (optional)

No response

c-bata commented 3 months ago

@hnanacc (cc: @tenzen-y) Thank you for your feature request!

@nomuramasahir0, the maintainer of cmaes (https://github.com/CyberAgentAILab/cmaes), is planning to work on implementing MOCMAES. However, we do not have a definite schedule for the completion of this task yet. Would it be possible for you (and Katib) to wait until our implementation is completed?

tenzen-y commented 3 months ago

@hnanacc (cc: @tenzen-y) Thank you for your feature request!

@nomuramasahir0, the maintainer of cmaes (https://github.com/CyberAgentAILab/cmaes), is planning to work on implementing MOCMAES. However, we do not have a definite schedule for the completion of this task yet. Would it be possible for you (and Katib) to wait until our implementation is completed?

@hnanacc @c-bata Thank you for pointing this out! Yes, we (katib) can wait for the implementation. It might be better to create a feature request issue in the cmaes (https://github.com/CyberAgentAILab/cmaes) repository to ask cmaes maintainers to raise the priority of MOCMAES. WDYT?

cc: @andreyvelich