fix(layout_optimizer): apply code review follow-ups

This commit is contained in:
yexiaozhou
2026-04-03 01:42:22 +08:00
parent 00bdf9b822
commit a7a6d77d7a
12 changed files with 336 additions and 68 deletions

View File

@@ -33,6 +33,7 @@ class Device:
model_path: str = ""
model_type: str = ""
thumbnail_url: str = ""
uuid: str = ""
@dataclass
@@ -84,8 +85,6 @@ class Constraint:
params: dict = field(default_factory=dict)
# 仅 soft 约束使用
weight: float = 1.0
# 优先级等级,影响有效权重的乘数
priority: str | None = None # "critical" | "high" | "normal" | "low"
@dataclass