mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-23 13:30:25 +08:00
Update constants key to work with v2.1
This commit is contained in:
@@ -8,7 +8,6 @@ from typing import Union
|
||||
import numpy as np
|
||||
from optuna.distributions import BaseDistribution
|
||||
from optuna.distributions import CategoricalDistribution
|
||||
from optuna.samplers._base import _CONSTRAINTS_KEY
|
||||
from optuna.study import StudySummary
|
||||
from optuna.trial import FrozenTrial
|
||||
|
||||
@@ -84,6 +83,7 @@ if TYPE_CHECKING:
|
||||
|
||||
|
||||
MAX_ATTR_LENGTH = 1024
|
||||
CONSTRAINTS_KEY = "constraints"
|
||||
|
||||
|
||||
def serialize_attrs(attrs: dict[str, Any]) -> list[Attribute]:
|
||||
@@ -188,7 +188,7 @@ def serialize_frozen_trial(
|
||||
),
|
||||
"note": note.get_note_from_system_attrs(study_system_attrs, trial._trial_id),
|
||||
"artifacts": list_trial_artifacts(study_system_attrs, trial._trial_id),
|
||||
"constraints": trial_system_attrs.get(_CONSTRAINTS_KEY, []),
|
||||
"constraints": trial_system_attrs.get(CONSTRAINTS_KEY, []),
|
||||
}
|
||||
|
||||
serialized_intermediate_values: list[IntermediateValue] = []
|
||||
|
||||
Reference in New Issue
Block a user