peal.web

PEAL web demo: upload an ONNX classifier and a zipped image-folder dataset, get the DiDAE Clever Hans analysis and a corrected classifier back.

uvicorn peal.web.app:app –host 0.0.0.0 –port 8080

See peal/web/app.py for the HTTP API and deploy/spark for the DGX Spark setup.

Submodules

analysis

Per-direction analysis shown on the feedback page of a web-demo job:

app

HTTP API of the PEAL web demo (FastAPI).

cache

Per-image cache of a web-demo job, built in ONE pass over the upload:

config_builder

Turn a web job (uploaded ONNX + ingested two-class dataset + the mandatory form fields) into the three yaml files run_didae.py needs:

dfr

Last-layer correction (DFR, deep feature reweighting) of a web-demo job:

ingest

Dataset ingest for the web demo: a zip of one folder per class becomes the imgs/<0|1>/... + data.csv layout Image2MixedDataset reads (the same layout tools/generate_imagenet_binary_dataset.py writes).

jobs

Job store and the single-GPU worker of the web demo.

paths

Repo root without importing peal.global_utils (which pulls in transformers, tensorflow and friends): the web process only needs the path.

summarize

After a job's run_didae.py subprocess exits, condense its run directory into <job>/results.json for the results page: