Add the loop's end-of-session page and a detector benchmark on the case base
- End-of-session page for /boucle: the session's curves, the analyst's labels against the detectors' events per category, a plain score table and the benchmark (comparaison.py, D-066) - Detectors moved to vues-deplacements/detectors/ (D-067) - Detectors must detect everything; what the client sees is a separate layer (D-068) - Benchmark: each case keeps its labels from creation (etiquettes.json), benchmark.py scores the detectors on every case, history in vues-deplacements/benchmark/historique.csv; run by /boucle at each lot, after each change and at the end, read by the upgrader and validator; labels for C-001..C-005 from one analyst pass corrected by their files, C-006..C-008 from lot 01 (D-069) - Fixes from the releveur's notes: /boucle arguments and other sessions, branch name in the spec, detector name in categories.py output, learned case header, anonymiser.py (camera/, no empty CSVs, --etiquettes), ensemble.py (clock-aligned steps, title), plages.py (same-sign merge), labeling request written into /nouveau-cas - Also carries the other session's uncommitted D-065 edits in the same files; data/, .gitignore, pomper.py and stations.py are left out Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6b3d058a67
commit
d5bae7a696
57 files changed
+1727
-157
No files matched your search
@@ -22,7 +22,7 @@ from datetime import timedelta
|
||||
from pathlib import Path
|
||||
|
||||
RACINE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "..")
|
||||
sys.path.insert(0, os.path.join(RACINE, "vues-deplacements", "journal"))
|
||||
sys.path.insert(0, os.path.join(RACINE, "vues-deplacements", "detectors"))
|
||||
sys.path.insert(0, os.path.join(RACINE, ".claude", "skills", "critiquer-lot"))
|
||||
import categories # noqa: E402 (il met lui-même agents/diagnostic/outils sur le chemin)
|
||||
from donnees import charger, instant, iso # noqa: E402
|
||||
@@ -55,12 +55,16 @@ def marquer(cs, spans):
|
||||
return out
|
||||
|
||||
|
||||
def detectes(mesures, debut, fin):
|
||||
"""Événements des détecteurs qui touchent le lot, classé avec ses jours d'historique -> spans de marquer."""
|
||||
def evenements(mesures, debut, fin):
|
||||
"""Événements des détecteurs qui touchent le lot, classé avec ses jours d'historique (comme la commande du lot)."""
|
||||
h, b = instant(debut) - HISTORIQUE, instant(fin)
|
||||
tranche = {s: k for s, ms in mesures.items() if (k := [m for m in ms if h <= m["t"] < b])}
|
||||
return [(v["start"], v["end"], v["sensors"], v["category"])
|
||||
for v in (categories.evenements(tranche) if tranche else []) if v["end"] >= debut]
|
||||
return [v for v in (categories.evenements(tranche) if tranche else []) if v["end"] >= debut]
|
||||
|
||||
|
||||
def detectes(mesures, debut, fin):
|
||||
"""Événements des détecteurs du lot -> spans de marquer."""
|
||||
return [(v["start"], v["end"], v["sensors"], v["category"]) for v in evenements(mesures, debut, fin)]
|
||||
|
||||
|
||||
def score(etiq, det):
|
||||
@@ -119,6 +123,7 @@ def lots(dossier, chemins, explicite):
|
||||
afficher(f"Total : {vus} lots", total)
|
||||
elif not vus:
|
||||
print(f"Aucun lot étiqueté de {station} à compter.")
|
||||
return total # la page de fin de séance (comparaison.py) en fait son tableau
|
||||
|
||||
|
||||
def test():
|
||||
|
||||
Reference in new issue
Block a user