import json, os, glob m = {} for d in sorted(glob.glob("runs/*_lr*")): if not os.path.isdir(d) or not os.path.exists(f"{d}/checkpoints.jsonl"): continue s = os.stat(f"{d}/config.json").st_mtime; e = os.stat(f"{d}/checkpoints.jsonl").st_mtime steps = sum(1 for l in open(f"{d}/metrics.jsonl") if '"env/all/correct"' in l) planned = 3 if "pilot" in d else 40 m[os.path.basename(d)] = {"seconds": round(e - s, 1), "units": steps, "planned_units": planned, "samples": steps * 64, "gpu_count": None, "allocation_source": "shared Spindle (allocation not exposed)"} json.dump(m, open("feasibility_measurements.json", "w"), indent=1); print(json.dumps(m))