File size: 1,070 Bytes
9118991 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | """Shared, explicit experiment identities; a study is not Table-1 calibration."""
STUDY_SAMPLES = (16, 32, 64, 128, 256, 512, 1024, 2048)
FIGURE6_SAMPLES = (32, 64, 128, 256, 512, 1024, 2048)
SLT_BUDGETS = (0, 2, 4, 8)
def calibration_identity(*, smoke: bool, samples: int, study_samples: bool,
budget: int, ablation: str | None) -> dict:
if samples <= 0 or budget not in SLT_BUDGETS:
raise ValueError("invalid sample count or SLT budget")
expected_budget = 0 if ablation == "no_slt" else 4
studies = []
if study_samples:
if samples not in STUDY_SAMPLES:
raise ValueError("unsupported calibration-size study")
studies.append("calibration_size")
if budget != expected_budget:
studies.append("slt_budget")
paper = not smoke and not studies and samples == 1024
return dict(paper_calibration=paper, study={"axes": studies, "samples": samples,
"slt_budget": budget} if studies else None,
run_kind="smoke" if smoke else "study" if studies else "paper_profile")
|