From 9a73ef3631d08d2e4ee1597367bf98aff249d546 Mon Sep 17 00:00:00 2001 From: moririn2528 Date: Fri, 15 Sep 2023 18:24:32 +0900 Subject: [PATCH] fix by review --- optuna_dashboard/_app.py | 4 ++-- optuna_dashboard/_serializer.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/optuna_dashboard/_app.py b/optuna_dashboard/_app.py index 87efaae5..e13334d3 100644 --- a/optuna_dashboard/_app.py +++ b/optuna_dashboard/_app.py @@ -222,7 +222,7 @@ def create_app( plotly_graph_objects = get_plotly_graph_objects(system_attrs) skipped_trial_ids = get_skipped_trial_ids(system_attrs) - skipped_trials = [t.number for t in trials if t._trial_id in skipped_trial_ids] + skipped_trial_numbers = [t.number for t in trials if t._trial_id in skipped_trial_ids] return serialize_study_detail( summary, best_trials, @@ -232,7 +232,7 @@ def create_app( union_user_attrs, has_intermediate_values, plotly_graph_objects, - skipped_trials, + skipped_trial_numbers, ) @app.get("/api/studies//param_importances") diff --git a/optuna_dashboard/_serializer.py b/optuna_dashboard/_serializer.py index af3ed242..1f2b84bd 100644 --- a/optuna_dashboard/_serializer.py +++ b/optuna_dashboard/_serializer.py @@ -135,7 +135,7 @@ def serialize_study_detail( union_user_attrs: list[tuple[str, bool]], has_intermediate_values: bool, plotly_graph_objects: dict[str, str], - skipped_trials: list[int], + skipped_trial_numbers: list[int], ) -> dict[str, Any]: serialized: dict[str, Any] = { "name": summary.study_name, @@ -167,7 +167,7 @@ def serialize_study_detail( if serialized["is_preferential"]: serialized["preference_history"] = serialize_preference_history(system_attrs) serialized["preferences"] = get_preferences(system_attrs) - serialized["skipped_trial_numbers"] = skipped_trials + serialized["skipped_trial_numbers"] = skipped_trial_numbers serialized["plotly_graph_objects"] = [ {"id": id_, "graph_object": graph_object} for id_, graph_object in plotly_graph_objects.items()