refactor: remove block-sequential gate path and gate_block knob (algo #6)

config/train_videomme.yaml 同时收录待入库的实验配置变更(run_id v2 /
concurrency 32 / batch_size 40)。tests/integration/test_v3_contract_e2e.py
的 run_id 断言按 Task 5 显式契约同步修正(原断言依赖旧隐式实例注入)。
This commit is contained in:
2026-07-17 04:40:14 -04:00
parent 0b839937df
commit 8958eee11b
18 changed files with 322 additions and 791 deletions
+8 -9
View File
@@ -50,7 +50,6 @@ def _valid_kwargs() -> dict:
"gate_delta_min": 0.02,
"gate_lambda_dir": -0.642,
"gate_e_rollback": 10.0,
"gate_block": 8,
"gate_n_max": 40,
"gate_p_low": 0.05,
"gate_p_high": 0.95,
@@ -378,16 +377,16 @@ class TestGateValidation:
with pytest.raises(ValueError, match="gate_lambda_dir"):
_validate(cfg)
def test_block_exceeds_n_max_rejected(self) -> None:
"""gate_block > gate_n_max 应抛出 ValueError"""
cfg = _make_config(gate_block=50, gate_n_max=40)
with pytest.raises(ValueError, match="gate_block"):
def test_n_max_zero_rejected(self) -> None:
"""gate_n_max <= 0 应抛出 ValueError(迁移自块序贯版 gate_block 校验)"""
cfg = _make_config(gate_n_max=0)
with pytest.raises(ValueError, match="gate_n_max"):
_validate(cfg)
def test_block_zero_rejected(self) -> None:
"""gate_block <= 0 应抛出 ValueError"""
cfg = _make_config(gate_block=0)
with pytest.raises(ValueError, match="gate_block"):
def test_n_max_negative_rejected(self) -> None:
"""gate_n_max 为负也应报错"""
cfg = _make_config(gate_n_max=-1)
with pytest.raises(ValueError, match="gate_n_max"):
_validate(cfg)
def test_p_low_exceeds_p_high_rejected(self) -> None: