peal.web.summarize.summarize¶
- peal.web.summarize.summarize(job_dir)[source]¶
Condense a finished web-demo job into
<job_dir>/results.json.- Parameters:
job_dir (
str) – Job directory containingrun/(the DiDAE run directory) andlog.txt(captured stdout ofrun_didae.py).- Returns:
The written summary with keys
directions(one entry per ranked direction fromrun/sweep_results.ptwith its flip counts, verdict and collage paths),feedback(verdicts keyed by direction index as strings),false_directions(indices judged"false"),accuracies(parsed fromlog.txt),outputs(relative paths ofrun/model.onnx/run/model.cplwhen present) andcorrected(True when an ONNX model exists and at least one direction was marked false).- Return type:
Notes
torchis imported lazily and only whenrun/sweep_results.ptexists, so the summary of a failed job can be built without a GPU environment. All paths in the result are relative tojob_dirso the results page can serve them directly.