Merge pull request #428 from c-bata/support-optuna-metric-names

Support `metric_names` introduced in Optuna
This commit is contained in:
Masashi Shibata
2023-04-27 17:13:54 +09:00
committed by c-bata
parent 86d3d54284
commit cdee5c28a5
3 changed files with 58 additions and 1 deletions
+16 -1
View File
@@ -7,7 +7,7 @@ Warning Messages
----------------
Human-in-the-loop optimization will not work with ``_CachedStorage`` in Optuna prior to v3.2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This warning occurs when the storage object associated with the Optuna Study is of the ``_CachedStorage`` class.
@@ -22,3 +22,18 @@ or use a following dirty hack to unwrap ``_CachedStorage`` class.
if isinstance(study._storage, optuna.storages._CachedStorage):
study._storage = study._storage._backend
``set_objective_names()`` function is deprecated. Please use ``study.set_metric_names()`` instead.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:func:`~optuna_dashboard.set_objective_names` function has been ported to Optuna.
Please use `study.set_metric_names() <https://optuna.readthedocs.io/en/latest/reference/generated/optuna.study.Study.html#optuna.study.Study>`_ function instead.
.. list-table::
* - Deprecated APIs
- Corresponding Active APIs
* - ``optuna_dashboard.set_objective_names(study, ["objective 1", "objective 2"])``
- ``study.set_metric_names(["objective 1", "objective 2"])``