optimize: the benchmark is in ~/aimsight-models/rules/bench (BENCH, measuring $DETECTORS); the detectors in detectors/, thresholds.md in models/rules
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0cfbd1b7bc
commit
698fededa3
3 files changed
+9
-9
No files matched your search
@@ -14,7 +14,7 @@ Given by the caller, in the request; any other context or rule it gives (files t
|
||||
|
||||
- `ANALYSIS` (required): the analysis folder: `request.json` (`station`, `start`, `end`, UTC), `labels.jsonl`, `report.md`, `analysis.md`, `scripts/`.
|
||||
- `OUT` (required): the output folder of this run (`sessions/<analysis>_<YYYYMMDDTHHMMZ>/` in Optimizer).
|
||||
- Defaults, relative to Optimizer's root (its links), which the request may override: `DETECTORS: detectors/`, `TOOLS: tools/`, `DATA: data`, `LABELS: labeling/auto` (the folder of the `<STATION>.jsonl` label files, JSONL: `id`, `start`, `end`, `family`, `description`), `FAMILIES: labeling/families.md` (the families and their boundaries, one detector per family).
|
||||
- Defaults, relative to Optimizer's root (its links), which the request may override: `DETECTORS: detectors/`, `BENCH: ~/aimsight-models/rules/bench` (the benchmark of the detectors, outside them: it measures `$DETECTORS`), `TOOLS: tools/`, `DATA: data`, `LABELS: labeling/auto` (the folder of the `<STATION>.jsonl` label files, JSONL: `id`, `start`, `end`, `family`, `description`), `FAMILIES: labeling/families.md` (the families and their boundaries, one detector per family).
|
||||
|
||||
Derived from `<ANALYSIS>/request.json`:
|
||||
|
||||
@@ -28,11 +28,11 @@ Derived from `<ANALYSIS>/request.json`:
|
||||
|
||||
## Commands
|
||||
|
||||
- events: `python3 <DETECTORS>/scripts/categories.py <STATION> --from <FROM> --to <TO>`
|
||||
- sensors: `python3 <DETECTORS>/bench/sensors.py <STATION> --from <FROM> --to <TO>`
|
||||
- range score (the goal): `python3 <DETECTORS>/bench/score.py <STATION> --labels <LABELS>/<station>.jsonl --from <FROM> --to <TO>`; it exits with an error if no label touches the range: note it in the summary, touch nothing in the detectors and go to part 2.
|
||||
- benchmark (the non-regression, about 1 min): `python3 <DETECTORS>/bench/regression.py <REFERENCE>`
|
||||
- compare (the regressions and the complexity of two benchmarks): `python3 <DETECTORS>/bench/compare.py <before.txt> <after.txt>`
|
||||
- events: `python3 <DETECTORS>/detectors/categories.py <STATION> --from <FROM> --to <TO>`
|
||||
- sensors: `DETECTORS=<DETECTORS> python3 <BENCH>/sensors.py <STATION> --from <FROM> --to <TO>`
|
||||
- range score (the goal): `DETECTORS=<DETECTORS> python3 <BENCH>/score.py <STATION> --labels <LABELS>/<station>.jsonl --from <FROM> --to <TO>`; it exits with an error if no label touches the range: note it in the summary, touch nothing in the detectors and go to part 2.
|
||||
- benchmark (the non-regression, about 1 min): `DETECTORS=<DETECTORS> python3 <BENCH>/regression.py <REFERENCE>`
|
||||
- compare (the regressions and the complexity of two benchmarks): `python3 <BENCH>/compare.py <before.txt> <after.txt>`
|
||||
|
||||
The measures of a step: `<range score> > <OUT>/range-<step>.txt 2>&1` and `<benchmark> > <OUT>/benchmark-<step>.txt 2>&1`.
|
||||
|
||||
@@ -51,7 +51,7 @@ Each agent is called with the Agent tool, its `subagent_type` (`agents:upgrader`
|
||||
It commits each fix it keeps, message `improve: S<n>`, with its benchmark `<OUT>/benchmark-S<n>.txt`; each rule its pruning removes is a fix of its own.
|
||||
Verdict `nothing to change`, or no fix commit (`git -C <DETECTORS> log --format=%h --grep ': S[0-9]*$' <base>..HEAD` empty): go to part 2.
|
||||
3. **Measures after**: step `after`.
|
||||
4. **Validator**, which reads neither the diagnosis nor the detail of the modification: `Target: <DETECTORS>. Modification: <OUT>/modification.md. Base: <base>. Checks: range: <range score>; before: <OUT>/range-before.txt; after: <OUT>/range-after.txt; benchmark: <benchmark>; before: <OUT>/benchmark-before.txt; after: <OUT>/benchmark-after.txt; after each fix: <OUT>/benchmark-S*.txt; compare: <compare>; events, for any station: python3 <DETECTORS>/scripts/categories.py <station folder> --from <from> --to <to>. Families: <FAMILIES>. Output: <OUT>/validation.md. INSTRUCTIONS: instructions/validator-detectors.md.`
|
||||
4. **Validator**, which reads neither the diagnosis nor the detail of the modification: `Target: <DETECTORS>. Modification: <OUT>/modification.md. Base: <base>. Checks: range: <range score>; before: <OUT>/range-before.txt; after: <OUT>/range-after.txt; benchmark: <benchmark>; before: <OUT>/benchmark-before.txt; after: <OUT>/benchmark-after.txt; after each fix: <OUT>/benchmark-S*.txt; compare: <compare>; events, for any station: python3 <DETECTORS>/detectors/categories.py <station folder> --from <from> --to <to>. Families: <FAMILIES>. Output: <OUT>/validation.md. INSTRUCTIONS: instructions/validator-detectors.md.`
|
||||
- `keep`: go to part 2.
|
||||
- `remove`: for each fix of the `**Remove**:` line, its commits (`git -C <DETECTORS> log --format=%h --grep ': S<n>$' <base>..HEAD`), from the most recent: `git -C <DETECTORS> revert --no-edit <commit>`, then `git -C <DETECTORS> commit --amend -m "improve: S<n> removed" -m "Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>"`. A conflict: `git -C <DETECTORS> revert --abort`, and do as for `cancel`.
|
||||
- `cancel`, or anything else: `git -C <DETECTORS> revert --no-commit <base>..HEAD && git -C <DETECTORS> commit -m "improve: modification cancelled" -m "Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>"` (only what the fix commits changed; files already modified stay as they are).
|
||||
|
||||
@@ -12,7 +12,7 @@ An analyst has analysed a range of a station where the detectors perform poorly.
|
||||
- The context documents (the analysis report): the mechanism of each event, the sensors touched and those that do not move, the level of proof; a document may say that a label is wrong: a limit to report, not a target.
|
||||
- The families document **in full**: the families and their boundaries; the category of an event is its family; the mechanisms (phenomena, false friends) are the cases: `python3 labeling/scripts/cases.py --list`, their files in `labeling/auto/cases/`.
|
||||
- The checks' outputs before: events (run it with `2>&1`), sensors (the cadence, then the sensors of each event), range score, benchmark.
|
||||
- The code of the detectors, `scripts/categories.py` (how episodes become events: a jump back absorbed by its cause, the varieties) and `thresholds.md`. You may read the station's data to understand why a rule fails.
|
||||
- The code of the detectors, `detectors/categories.py` (how episodes become events: a jump back absorbed by its cause, the varieties) and `~/aimsight-models/rules/thresholds.md` (the registry of their thresholds; `thresholds.md` below). You may read the station's data to understand why a rule fails.
|
||||
|
||||
## The diagnosis
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ The upgrader has just adapted the detectors to better find the events of a singl
|
||||
- The range score before → after: the gain the modification sought.
|
||||
- The benchmarks (the score per family on each station of the reference truth, then their `Total`), all stations in full; the benchmarks after each fix, in order, say which fix makes a station go back.
|
||||
- The families document, and the cases (`python3 labeling/scripts/cases.py --list`).
|
||||
- To understand a regression on a station: the events command on its range (from the header of the station's block in the benchmark), with `2>&1`, at HEAD and, to compare, at the base (`git -C <Target> archive <base> | tar -x -C <folder>` in your working folder, then the same command with the copy's `scripts/categories.py`), and the station's labels.
|
||||
- To understand a regression on a station: the events command on its range (from the header of the station's block in the benchmark), with `2>&1`, at HEAD and, to compare, at the base (`git -C <Target> archive <base> | tar -x -C <folder>` in your working folder, then the same command with the copy's `detectors/categories.py`, `scripts/categories.py` before 2026-11-25), and the station's labels.
|
||||
|
||||
## What you judge, for the detectors
|
||||
|
||||
|
||||
Reference in new issue
Block a user