mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-09 11:28:14 +08:00
fix by review
This commit is contained in:
@@ -8,7 +8,7 @@ from optuna import get_all_study_summaries
|
||||
from optuna.study import StudyDirection
|
||||
from optuna_dashboard._app import create_app
|
||||
from optuna_dashboard._app import create_new_study
|
||||
from optuna_dashboard._preference_setting import register_preference_feedback_component_type
|
||||
from optuna_dashboard._preference_setting import register_preference_feedback_component
|
||||
from optuna_dashboard._preferential_history import NewHistory
|
||||
from optuna_dashboard._preferential_history import remove_history
|
||||
from optuna_dashboard._preferential_history import report_history
|
||||
@@ -187,7 +187,7 @@ class APITestCase(TestCase):
|
||||
def test_change_component(self) -> None:
|
||||
storage = optuna.storages.InMemoryStorage()
|
||||
study = create_study(storage=storage, n_generate=3)
|
||||
register_preference_feedback_component_type(study, "note")
|
||||
register_preference_feedback_component(study, "note")
|
||||
for _ in range(3):
|
||||
study.ask()
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ from unittest import TestCase
|
||||
|
||||
import optuna
|
||||
from optuna_dashboard._preference_setting import _SYSTEM_ATTR_FEEDBACK_COMPONENT
|
||||
from optuna_dashboard._preference_setting import register_preference_feedback_component_type
|
||||
from optuna_dashboard._preference_setting import register_preference_feedback_component
|
||||
from optuna_dashboard.preferential._study import PreferentialStudy
|
||||
|
||||
|
||||
class FeedbackSettingTestCase(TestCase):
|
||||
def test_widget_to_dict_from_dict(self) -> None:
|
||||
study = PreferentialStudy(optuna.create_study())
|
||||
register_preference_feedback_component_type(study, "artifact", "image_key")
|
||||
register_preference_feedback_component(study, "artifact", "image_key")
|
||||
system_attrs = study._study.system_attrs
|
||||
feedback_type = system_attrs.get(_SYSTEM_ATTR_FEEDBACK_COMPONENT, {})
|
||||
assert "type" in feedback_type
|
||||
|
||||
Reference in New Issue
Block a user