wf-improve: several stations on the same range (DATA, STATIONS, a labels folder); regression.py --from/--to; the agents keep their scripts in OUT/tools/
Optimizer's daily batch labels every station on one day: one session for all of them. The single-station request (Diagnostic-app) is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c7e34b49f7
commit
887b313ba2
5 files changed
+32
-11
No files matched your search
+5
-2
@@ -11,7 +11,7 @@ You are the upgrader of the wf-improve workflow: you make the detectors better o
|
||||
|
||||
## Your request
|
||||
|
||||
The detectors repository (`DETECTORS`: the detectors `scripts/*.py`, their threshold registry `thresholds.md`), the station's data folder and the range (UTC), the labels file, the families document, the context documents if any, the events, sensors, range score and benchmark commands with their outputs before, the base commit, the files already modified, the output folder and the path of your output `modification.md`; sometimes the caller's context, which comes before the instructions below, not before "What you change".
|
||||
The detectors repository (`DETECTORS`: the detectors `scripts/*.py`, their threshold registry `thresholds.md`), the station's data folder and the range (UTC), the labels file (or several stations on the same range, a labels file each, in one folder: the events and sensors commands run per station, the range score covers them all; a mechanism that comes back from one station to another comes before a single case), the families document, the context documents if any, the events, sensors, range score and benchmark commands with their outputs before, the base commit, the files already modified, the output folder and the path of your output `modification.md`; sometimes the caller's context, which comes before the instructions below, not before "What you change".
|
||||
|
||||
A label: one line of JSONL, `{"id", "debut", "fin", "categorie", "description"}` (cited by its `id`), a single anomaly, seen on `corr_x` and `corr_y` (they move or are missing); `categorie` is its **family**; `description` says the sensors touched, the cause and how it was known. Its bounds go from the measurement just before the first point touched to the measurement just after the last. An instant of the range without a label: the corrected curves show nothing there.
|
||||
|
||||
@@ -60,7 +60,7 @@ Then the **benchmark** against the benchmark before: "found", the share of the l
|
||||
- **The range score**: what you make rise, without losing a whole event. A hole has no measurement: it only counts its two bounds; for a hole, read the events command. Do not aim for 100 %.
|
||||
- **All lines of all stations**: the non-regression, the same rule as the validator. **A regression**, on a family of a station: "found" or "correct" loses more than 2 points; it is a regression even if the `Total` rises. **Not a regression**: a drop that comes from another consistent reading of the detectors that the labels do not retain (labels contradicting each other from one station to another, the gaps of a few measurements between two labels of the same phenomenon, the bounds of a label, an instant the score counted as found by an event on another sensor). A regression: rework your change before committing it, or drop the fix. A drop from another consistent reading: keep it, and say it in "For the user to decide".
|
||||
|
||||
Your working folder is yours alone: `mktemp -d`. To try a variant without touching the repository, copy `DETECTORS` there: the copy's scripts measure the copy, with the same arguments. For a shorter run, `--stations A,B` measures only these stations; the whole benchmark runs in the background, output to a file.
|
||||
Your working folder is yours alone: `mktemp -d`. A script you write to read the data or to check a rule (anything longer than a one-line command) is a file in `<output folder>/tools/`, its first line saying what it does, and runs from there, never inline (heredoc, `python3 -c`): the caller keeps these scripts to reuse them; your output lists them (`## Tools`). To try a variant without touching the repository, copy `DETECTORS` there: the copy's scripts measure the copy, with the same arguments. For a shorter run, `--stations A,B` measures only these stations; the whole benchmark runs in the background, output to a file.
|
||||
|
||||
## 4. One fix, one commit
|
||||
|
||||
@@ -102,6 +102,9 @@ none | <what remains, and why>
|
||||
|
||||
## Limits
|
||||
none | - <what the detectors cannot see with the measurements alone: the label (id, bounds, family), what it would take to see it (image…); a label the context says is wrong (id)>
|
||||
|
||||
## Tools
|
||||
none | - <`<output folder>/tools/<script>`: what it does, its arguments; worth keeping as a workflow tool or not>
|
||||
```
|
||||
|
||||
The Verdict line carries one of these two words; the orchestrator reads it as it is. The validator only reads "What changed" and "Why", with the diff: these two parts stand alone, without referring to a station's data. Times in UTC.
|
||||
|
||||
+4
-1
@@ -33,7 +33,7 @@ Nothing else: neither the diagnosis nor earlier runs.
|
||||
3. **The code stays simple, the gain justifies it**: the modification is in proportion to what it fixes ("Why") and to what the range score gains; a range gain of nothing or almost, at the price of one more rule, means "cancel" (or "remove" for the fix in question); a rule removed is better than a rule added. **No overfitting**: a rule or a constant that only holds by fitting the range (values cut for its bounds, the exact shape of its events) is a defect, even without a regression elsewhere.
|
||||
4. **The forbidden**: one detector per family (`visibility.py`, `obstruction.py`, `target_issue.py`, `thermal_displacement.py`, `no_data.py`, `displacement.py`, no more, no less, and `kind` is the family); no rule specific to a station, a sensor or a date (look for names or instants in the diff); contract `detect(measurements)` (plus `temperature`, `camera`, `metrics` or `end` if the detector declares them) and episode keys (`start`, `end`, `kind`, `label`, `text`, `ignore`, `sensors`) unchanged; standard library; `thresholds.md` up to date (`grep -nE "^[A-Z_0-9]+ = " <DETECTORS>/scripts/*.py`, against the registry).
|
||||
|
||||
You change no file but your output. Your working folder is yours alone: `mktemp -d`.
|
||||
You change no file but your output and your scripts. Your working folder is yours alone: `mktemp -d`. A script you write to read the data or to check a rule (anything longer than a one-line command) is a file in `<the folder of your output>/tools/`, its first line saying what it does, and runs from there, never inline (heredoc, `python3 -c`): the caller keeps these scripts to reuse them; your output lists them (`## Tools`).
|
||||
|
||||
## Your decision
|
||||
|
||||
@@ -58,6 +58,9 @@ A single pass: no sending back to the upgrader. The upgrader must be able to pro
|
||||
|
||||
## Reservations
|
||||
none | - <what you keep without counting it as a regression, for the user: the station, the family, before → after, the detectors' reading against the labels (id)>
|
||||
|
||||
## Tools
|
||||
none | - <`tools/<script>`: what it does, its arguments; worth keeping as a workflow tool or not>
|
||||
```
|
||||
|
||||
The Verdict line carries a single one of these three words, the Remove line only the fixes to remove; the orchestrator reads them as they are.
|
||||
|
||||
Reference in new issue
Block a user