Skip to content

Commit 21341ce

Browse files
authored
feat: Review-bundle builder, fixes for GraphCell with merged elements and more (#172)
* feat: preserve GraphCellLabel and handle merges in to_value GraphCells Signed-off-by: Christoph Auer <cau@zurich.ibm.com> * fix: GraphCell deduplication with merge groups Signed-off-by: Christoph Auer <cau@zurich.ibm.com> * feat: Review-bundle app builder Signed-off-by: Christoph Auer <cau@zurich.ibm.com> * Update lock Signed-off-by: Christoph Auer <cau@zurich.ibm.com> * Docs and updates for review-bundle-builder Signed-off-by: Christoph Auer <cau@zurich.ibm.com> * fixes for review-bundle-builder and graph-cell merge mapping Signed-off-by: Christoph Auer <cau@zurich.ibm.com> --------- Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
1 parent 8fb3a16 commit 21341ce

File tree

8 files changed

+5839
-2731
lines changed

8 files changed

+5839
-2731
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Review Bundle Workflow
2+
3+
Follow these steps whenever you need to review a submission’s visualization outputs.
4+
5+
## 1. Generate the Bundle
6+
7+
You need to start from a submission evaluation directory, e.g. `submission-4_10-11-2025_v0`, as created through the `cvat_evaluation_pipeline.py`.
8+
It is required to contain a `combined_evaluation.csv` (export it from `combined_evaluation.xlsx` if missing).
9+
10+
Run the bundle builder from the submission root. This reads `combined_evaluation.csv` and writes a timestamped bundle folder next to it. Both `need_review` and `need_task2_review` are included automatically in every bundle, so you can switch between them later without extra arguments.
11+
12+
```bash
13+
uv run python -m docling_eval.campaign_tools.review_bundle_builder \
14+
/path/to/submission-root
15+
```
16+
17+
The command prints the bundle path, e.g. `submission-4_10-11-2025_v0/review_bundle_20251110_162408`.
18+
19+
### Update an existing bundle in-place
20+
21+
If you already have progress in `review_state.json`, regenerate the manifest and static assets without touching that file by passing `--bundle-dir`. When `--bundle-dir` is supplied you can omit the positional `submission_dir`; the tool automatically resolves it to the bundle’s parent directory:
22+
23+
```bash
24+
uv run python -m docling_eval.campaign_tools.review_bundle_builder \
25+
--bundle-dir /path/to/submission-root/review_bundle_20251110_162408
26+
```
27+
28+
This keeps `review_state.json` intact while refreshing the HTML/JS/CSS.
29+
30+
## 2. Host the Submission Root
31+
32+
Serve the submission directory so the bundle and original visualization HTMLs share the same origin:
33+
34+
```bash
35+
cd /path/to/submission-root
36+
python -m http.server 8765
37+
```
38+
39+
Open `http://localhost:8765/review_bundle_*/index.html` in your browser.
40+
41+
## 3. Connect `review_state.json`
42+
43+
At the top of the page click **Connect bundle for saving**. Choose the same `review_bundle_*` folder. **This is critical** to ensure the browser has permissions to save into the `review_state.json`, which acts as a database. Once connected, the button switches to “Change bundle connection” and the status line on the bottom states that saves go directly to `review_state.json`. Decisions are still mirrored in browser storage as a safety net.
44+
45+
You can import prior logs via **Import log** (JSON or CSV). Imports do not change the save target — always reconnect if you move to another bundle.
46+
47+
## 4. Review and Save Decisions
48+
49+
The left sidebar lists documents sorted by the configured column. Selecting an entry loads its visualization(s). You will find the tab buttons for key-value and layout if both are available. The decision panel shows separate controls for **User A** and **User B**:
50+
51+
1. Use the **Priority** dropdown above the list to switch between `need_review`, `need_task2_review`, or any other column you exposed during bundle creation.
52+
2. Click **Correct** or **Need changes** for each user as needed (buttons stay lit when active).
53+
3. Optionally add a shared comment.
54+
4. Press **Save decision**. The status line confirms whether you saved user verdicts, comments only, or cleared the entry.
55+
56+
Edits remain locked to the current sample until you save or discard them; this prevents accidental navigation losses. Use **Export CSV** at any time for an external report.

0 commit comments

Comments
 (0)