File size: 872 Bytes
36357ab
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
# MIT License, Bryan Cheng, 2026.
"""Mini plan for a CPU smoke test of intervene.py (shared zero, gen half, claim, per-direction backgrounds, knockout)."""
import json
p = json.load(open("results/interventions/plan_qwen05.json"))
loc = next(d for d in p["directions"] if d["kind"] == "locus" and d.get("source") and d["knockout_carriers"])
loc = {**loc, "knockout_carriers": loc["knockout_carriers"][:1]}
rnd = {**next(d for d in p["directions"] if d["kind"] == "random"), "backgrounds": p["backgrounds"][:1]}
mini = {**p, "backgrounds": p["backgrounds"][:2], "doses_base": [-1.0, 0.0, 1.0], "doses_bg": [-1.0, 0.0, 1.0],
        "directions": [rnd, {**loc, "backgrounds": p["backgrounds"][:1]}]}
json.dump(mini, open("results/interventions/smoke_plan_d031.json", "w"), indent=1)
print([d["id"] for d in mini["directions"]], mini["backgrounds"], loc["knockout_carriers"])