feat: add video-split config knobs and reproducible script
This commit is contained in:
@@ -160,6 +160,16 @@ class PoolConfig:
|
||||
eval_min_per_class: 验证池中每类保底样本数(GlobalStrategy 用)。
|
||||
train_ratio: train/(train+val) 比例(PerCategoryStrategy 用)。
|
||||
test_questions_dir: 外部 test 题源路径(PerCategoryStrategy 用)。
|
||||
n_trainval: trainval 目标视频数(结果驱动视频级切分用;0 表示不启用)。
|
||||
floor_k: 各高信号 task_type 的 T2 defect 下限(视频级切分硬约束;空表示无约束)。
|
||||
epsilon: test 相对全局的最大允许分布偏差(视频级切分 test 代表性守护)。
|
||||
report_floor: per-type 报告门限,题数 ≥ 此值的 task_type 才入 ε 约束(视频级切分用)。
|
||||
val_wrong_min: validation 池最少错题数(McNemar 功效护栏;0 表示不检查)。
|
||||
|
||||
实现细节:
|
||||
视频级切分五个旋钮均带惰性默认(0 / 空 dict),使现有 GlobalPoolStrategy /
|
||||
PerCategoryStrategy 的构造点无需改动即可保持行为不变。floor_k 为不可哈希 dict,
|
||||
标 hash=False 排除出 frozen dataclass 的自动 __hash__,避免入 set/dict 键时报错。
|
||||
"""
|
||||
|
||||
task_types: tuple[str, ...] | None
|
||||
@@ -174,3 +184,8 @@ class PoolConfig:
|
||||
train_ratio: float
|
||||
test_questions_dir: _Path | None
|
||||
batch_correct_ratio: float | None = None
|
||||
n_trainval: int = 0
|
||||
floor_k: dict[str, int] = field(default_factory=dict, hash=False)
|
||||
epsilon: float = 0.0
|
||||
report_floor: int = 0
|
||||
val_wrong_min: int = 0
|
||||
|
||||
Reference in New Issue
Block a user