test: prune low-value and duplicate tests

- Remove tautological test_trainer assertions that never trained
- Drop grpo isfinite-only smokes and merge frozen-model checks via parametrize
- Merge duplicate tool_parser cases (find/streaming/factory) with parametrize
- Collapse duplicate dataset store/detect_format tests
- Remove misleading scheduler/task tests that asserted the opposite of their names
- Merge signal-handler SIGTERM/SIGINT into one parametrized case
- Drop cross-file grpo strategy duplication kept in online_strategy
This commit is contained in:
2026-08-01 16:01:20 +08:00
parent 91acaf4b0b
commit a27c8a819d
10 changed files with 137 additions and 342 deletions
+2 -11
View File
@@ -98,18 +98,9 @@ def test_loralinear_merge():
assert lora._merged
assert not hasattr(lora, "lora_A")
def test_loralinear_merge_is_idempotent():
base = Linear(4, 4)
with torch.no_grad():
base.weight.zero_()
lora = LoRALinear(base, r=2, alpha=2)
with torch.no_grad():
lora.lora_B.fill_(1.0)
lora.merge()
# merge is guarded by _merged — a second call is a no-op.
lora.merge()
assert lora._merged
def test_inject_lora_default_target():