fix by review

This commit is contained in:
moririn2528
2023-09-15 18:24:32 +09:00
parent b7bd8ccd6e
commit 9a73ef3631
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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/<study_id:int>/param_importances")
+2 -2
View File
@@ -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()