Quarantine transport-invalid oracle trial

This commit is contained in:
2026-07-13 23:16:04 +08:00
parent a9e7e9991e
commit d3bc63a972
3 changed files with 71 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ ORACLE_GAP = Path(__file__).resolve().parents[1] / "scripts/oracle_gap"
sys.path.insert(0, str(ORACLE_GAP))
from analyze import score_trial, summarize_trials # noqa: E402
from run_frontier import UP_EXTENSIONS, resume_compatible # noqa: E402
from run_frontier import AMENDMENT, UP_EXTENSIONS, resume_compatible # noqa: E402
def _request(
@@ -153,14 +153,19 @@ def test_a_og_1_extends_only_mutable_resume_fields() -> None:
"manifests": {"P01": "a", "P06": "b"},
"runtime": "runtime",
"driver": "driver",
"analyzer_sha256": "analyzer",
"config_details": {"C00": {}},
"base_rates": {"P01": [26], "P06": [1.4]},
"up_extensions": {"P01": [38.0], "P06": [2.1, 2.2, 2.3]},
}
amended = {
**immutable,
"controller_sha256": "new",
"repo_commit": "new",
"up_extensions": {"P06": [2.4]},
"up_extensions": {
"P01": [38.0],
"P06": [2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.8, 3.0],
},
}
assert UP_EXTENSIONS["P06"][-5:] == (2.4, 2.5, 2.6, 2.8, 3.0)
@@ -168,3 +173,26 @@ def test_a_og_1_extends_only_mutable_resume_fields() -> None:
assert not resume_compatible(
immutable, {**amended, "manifests": {"P01": "changed"}}
)
def test_a_og_2_requires_the_amended_grid_to_stay_fixed() -> None:
old = {
"analyzer_sha256": "analyzer",
"p5_client_sha256": "p5",
"p3_client_sha256": "p3",
"vllm_commit": "vllm",
"model": "model",
"manifests": {"P01": "a", "P06": "b"},
"runtime": "runtime",
"driver": "driver",
"config_details": {"C00": {}},
"base_rates": {"P01": [26], "P06": [1.4]},
"up_extensions": {"P01": [38.0], "P06": [2.1, 2.2, 2.3, 2.4]},
}
assert AMENDMENT == "A-OG-2"
assert resume_compatible(old, {**old, "controller_sha256": "new"})
assert not resume_compatible(
old,
{**old, "up_extensions": {"P01": [38.0], "P06": [2.1, 2.2, 2.3, 2.5]}},
)