Add OpProf campaign: protocols, results, patches, run evidence (P0-P6)
Workload-conditioned operator profiling on patched vLLM 0.24.0 + Qwen3-30B-A3B/H20. H1b PASS (irregular patterns carry +23-45pp R64 raggedness, 8-45% token-efficiency loss vs rectangular controls); mechanism decomposition kills the padding narrative and finds the arrival-uniformization artifact (-12.9%); cross-version churn surface shows TP2/MNS64 -29.4% across vLLM 0.20->0.24 while the argmax held. Raw Layer-1 JSONL streams (507 MB) stay on disk, git-ignored; footer sidecars and metrics are tracked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
43
runs/opprof-phase6/test_phase6_tools.py
Normal file
43
runs/opprof-phase6/test_phase6_tools.py
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
HERE = Path(__file__).resolve().parent
|
||||
|
||||
|
||||
def load(name: str, path: Path):
|
||||
spec = importlib.util.spec_from_file_location(name, path)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
assert spec.loader is not None
|
||||
spec.loader.exec_module(module)
|
||||
return module
|
||||
|
||||
|
||||
def main() -> None:
|
||||
controller = load("p6controller", HERE / "opprof_phase6_controller.py")
|
||||
solo = load("p6solo", HERE / "opprof_phase6_solo_controller.py")
|
||||
analysis = load("p6analysis", HERE / "analyze_phase6.py")
|
||||
assert len(controller.CELLS) == 12
|
||||
primary = sum(3 if item.get("trap") else 2 for item in controller.CELLS.values())
|
||||
assert primary == 25
|
||||
assert sum(len(gpus) for _name, wave, _cost in controller.WAVES for _cell, gpus in wave) == 28
|
||||
scores = {"a": 1.0, "b": 1.0, "c": 2.0}
|
||||
tol, buckets = analysis.floor_buckets(scores)
|
||||
assert tol == 2e-6 and buckets["a"] == buckets["b"] < buckets["c"]
|
||||
tau = analysis.kendall_tau_b({"a": 0, "b": 1, "c": 2}, {"a": 0, "b": 1, "c": 2})
|
||||
assert tau["tau_b"] == 1.0 and tau["concordant"] == 3
|
||||
assert len(solo.ORDER) == 12 and set(solo.ORDER) == set(controller.CELLS)
|
||||
assert sum(len(items) for items in solo.CORE.values()) == 23
|
||||
assert sum(2 if len(items) == 1 else len(items) for items in solo.CORE.values()) == 25
|
||||
assert solo.GPU_LIMIT == 6.0
|
||||
assert sum(solo.CELL_ESTIMATE.values()) + solo.SAFETY_HOURS == 3.44
|
||||
assert solo.next_below([.1, .2, .3], {.2, .3}) == .1
|
||||
assert solo.next_above([.1, .2, .3], {.1, .2}) == .3
|
||||
print("phase6 tools: PASS")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user