From 265dfb4c95afe04f4d30c9df0044c584aa48a158 Mon Sep 17 00:00:00 2001 From: c-bata Date: Tue, 28 Nov 2023 14:57:01 +0900 Subject: [PATCH] Update trial artifacts after uploaded --- optuna_dashboard/artifact/_backend.py | 1 + 1 file changed, 1 insertion(+) diff --git a/optuna_dashboard/artifact/_backend.py b/optuna_dashboard/artifact/_backend.py index 9720124b0..81cd766d3 100644 --- a/optuna_dashboard/artifact/_backend.py +++ b/optuna_dashboard/artifact/_backend.py @@ -139,6 +139,7 @@ def upload_trial_artifact_api(study_id: int, trial_id: int) -> dict[str, Any]: storage.set_trial_system_attr(trial_id, attr_key, json.dumps(artifact)) response.status = 201 + trial = storage.get_trial(trial_id) # Fetch trial.system_attrs again. return { "artifact_id": artifact_id, "artifacts": list_trial_artifacts(storage.get_study_system_attrs(study_id), trial),