mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-12 12:40:33 +08:00
Fix importance cache
This commit is contained in:
@@ -60,7 +60,9 @@ def get_param_importance_from_trials_cache(
|
||||
|
||||
cache_key = f"{study_id}:{objective_id}"
|
||||
with param_importance_cache_lock:
|
||||
cache_n_trial, cache_importance = param_importance_cache.get(cache_key, [0, {}])
|
||||
cache_n_trial, cache_importance = param_importance_cache.get(
|
||||
cache_key, [0, {"target_name": target_name, "param_importances": []}]
|
||||
)
|
||||
if n_completed_trials == cache_n_trial:
|
||||
return cache_importance
|
||||
|
||||
|
||||
Reference in New Issue
Block a user