sessions of 2026-11-18 (the optimization campaign; three runs without summary, interrupted and rerun)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8a81c53cd9
commit
0cfbd1b7bc
363 files changed
+30822
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# Raw episodes of one detector module (before categories.py), optionally for one sensor, over a window (FROM minus 3 days history, as score.py). Args: detectors_dir station_folder module FROM TO [sensor]
|
||||
import sys
|
||||
from datetime import timedelta
|
||||
from pathlib import Path
|
||||
det, folder, mod, a, b = sys.argv[1:6]
|
||||
sensor = sys.argv[6] if len(sys.argv) > 6 else None
|
||||
sys.path[:0] = [str(Path(det) / "scripts"), "/home/maxime/aimsight-tools/scripts"]
|
||||
import importlib
|
||||
from data import load, parse_time
|
||||
ms = load(folder)
|
||||
h, e = parse_time(a) - timedelta(days=3), parse_time(b)
|
||||
chunk = {s: k for s, l in ms.items() if (k := [m for m in l if h <= m["t"] < e])}
|
||||
m = importlib.import_module(mod)
|
||||
eps = m.detect(chunk, e) if mod == "no_data" else m.detect(chunk)
|
||||
for ep in sorted(eps, key=lambda x: x["start"]):
|
||||
if sensor and sensor not in ep["sensors"]:
|
||||
continue
|
||||
print(ep["start"], ep["end"], ep["kind"], "/", ep["label"], ",".join(ep["sensors"][:5]) if len(ep["sensors"]) < 6 else f"{len(ep['sensors'])} sensors", "|", ep["text"][:100])
|
||||
Reference in new issue
Block a user