Diagnostic-app

The control station of the AIMsight diagnostic: see, analyze, launch. The Data page shows the curves, the camera images, the labels and the detectors' events; its Analysis tab launches, by claude -p, processes whose code lives in the other repositories:

  • "Analyze the range": the analyst of the agents repository, on a chosen range, with the app's instructions (instructions/analyst.md) and without the detectors (DETECTORS: no): labels, submitted to labeling/auto/, and a diagnostic report;
  • "Optimize the detectors", on a finished analysis: /optimize in Optimizer, on the analysis: it improves the detectors on the range of the analysis, its labels as truth, without overfitting; then it brings the analyst's scripts into the reading harness (tools repository).

The architecture of the repositories, one responsibility each: docs/architecture.drawio.

The repository

  • app/: the web app (FastAPI server, React and Mantine page); its doc in app/README.md.
  • instructions/analyst.md: what the app asks of the analyst (output folder, report, dialogue).
  • docs/: the architecture of the repositories, the plans.

And six links, ignored by git, to the neighbouring repositories (a single copy of each on the workstation):

Link Repository What the app does with it
data/ ~/aimsight-data/data reads the data of the stations (outside git)
labeling/ ~/labeling reads and writes the labels; the analyses go in labeling/auto/analyses/
detectors/ ~/detectors reads the detectors' events (scripts/categories.py)
tools/ ~/tools reads the data through tools/scripts/data.py; the analyst uses it, the tool-builder writes in it
agents/ ~/agents the plugin of the agents (--plugin-dir agents, --agent agents:analyst)
optimizer/ ~/Optimizer launches /optimize there; reads the summaries in optimizer/sessions/

Each thing is committed in its own repository: the labels in ~/labeling, the detectors in ~/detectors (the optimization session does it, without pushing), the tools in ~/tools (the same session, through the tool-builder).

Install and launch

ln -s ~/aimsight-data/data data && ln -s ~/labeling labeling && ln -s ~/detectors detectors
ln -s ~/tools tools && ln -s ~/agents agents && ln -s ~/Optimizer optimizer

The VS Code task Run app creates .venv and builds the front end if they are missing, then launches the server. By hand:

python3 -m venv .venv && .venv/bin/pip install -r app/requirements.txt
cd app/web && npm install && npm run build && cd ../..
.venv/bin/python app/server/server.py

The page opens on http://127.0.0.1:8770. claude (Claude Code, logged in to the subscription) must be on the PATH for the Analysis tab.

Pump the data

The pumping is in the ~/aimsight-data repository (extraction/, VS Code tasks pump and pump a range); user guide ~/aimsight-data/extraction/README.md.

Check

  • the app: .venv/bin/python app/server/check.py;
  • the labels: python3 labeling/scripts/validate.py (the labels submitted by the app do not have review yet, which it requires: as many expected errors);
  • the detectors (benchmark, ~3 min): python3 detectors/bench/regression.py --labels labeling/auto --data data.
S
Description
Diagnostic app for AIMsight
Readme
6.8 MiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 50.7%
Python 46.7%
CSS 2.2%
HTML 0.4%