fix by review

This commit is contained in:
moririn2528
2023-09-14 16:39:44 +09:00
parent 9d7f2f9a6e
commit 4570efe74d
5 changed files with 9 additions and 8 deletions
+2 -2
View File
@@ -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