Add Qwen235 state replay diagnosis

This commit is contained in:
2026-07-19 18:31:47 +08:00
parent 10567da523
commit 5927b6bfc3
5 changed files with 476 additions and 0 deletions

View File

@@ -135,6 +135,58 @@ class FidelityEnvelopeTest(unittest.TestCase):
self.assertEqual(len(evidence), 1)
self.assertEqual(evidence[0]["log"], "stdout.log")
def test_qwen235_state_replay_changes_observation_flags_only(self) -> None:
module = load("run_qwen235_fixed_pd_state_replay.py")
base = [
"/usr/bin/python3",
"-m",
"frontier.main",
"--metrics_config_output_dir",
"/frozen/metrics",
"--metrics_config_run_id",
"frozen",
"--no-metrics_config_store_frontier_stage_batch_ledger",
"--attn_tensor_parallel_size",
"8",
"--moe_expert_parallel_size",
"8",
"--communication_collective_profile_path",
"/profiles/real-allreduce.csv",
]
transformed = module.transform_command(
base, metrics_root=Path("/new/metrics"), run_id="state-run"
)
self.assertEqual(
module.option_value(transformed, "--attn_tensor_parallel_size"), "8"
)
self.assertEqual(
module.option_value(transformed, "--communication_collective_profile_path"),
"/profiles/real-allreduce.csv",
)
self.assertIn(
"--metrics_config_store_frontier_stage_batch_ledger", transformed
)
self.assertIn("--metrics_config_keep_individual_batch_metrics", transformed)
self.assertNotIn(
"--no-metrics_config_store_frontier_stage_batch_ledger", transformed
)
def test_qwen235_state_replay_rejects_implicit_ledger_base(self) -> None:
module = load("run_qwen235_fixed_pd_state_replay.py")
base = [
"/usr/bin/python3",
"-m",
"frontier.main",
"--metrics_config_output_dir",
"/frozen/metrics",
"--metrics_config_run_id",
"frozen",
]
with self.assertRaisesRegex(ValueError, "explicitly disable one full Frontier ledger"):
module.transform_command(
base, metrics_root=Path("/new/metrics"), run_id="state-run"
)
def test_materialize_qwen235_allreduce_requires_serving_contract(self) -> None:
module = load("materialize_qwen235_v020_allreduce.py")
with tempfile.TemporaryDirectory() as temporary: