Skip to content

feat: flat-layout CVAT campaign tools and resilient shard writing - #206

Merged
cau-git merged 34 commits into
mainfrom
cau/upgrade-deps
Mar 31, 2026
Merged

feat: flat-layout CVAT campaign tools and resilient shard writing#206
cau-git merged 34 commits into
mainfrom
cau/upgrade-deps

Conversation

@cau-git

@cau-git cau-git commented Mar 30, 2026

Copy link
Copy Markdown
Member

Summary

Flat-layout CVAT campaign tools

Three new scripts for flat delivery directories (complement to the existing submission-style tools):

Script Purpose
convert_flat_cvat_deliveries_to_docling.py Batch-converts flat CVAT XML deliveries → DoclingDocument JSON + HTML; supports parallelism, dry-run, and structured run reports
flat_cvat_deliveries_to_hf.py Aggregates flat-batch exports into a HuggingFace-ready parquet dataset
cvat_task_batch_uploader_flat.py Uploads <task>/images/ + <task>/annotations.xml layouts as tasks to a CVAT project

save_shard_to_disk rework

  • Returns SaveShardResult (written/skipped counts, next shard id) instead of None
  • Automatically splits batches into multiple shards when estimated size exceeds 1.5 GB
  • Per-shard ArrowCapacityError recovery with skipped_records.jsonl audit log

Extensions

  • cvat_create_annotation_tasks_from_folders.py: added --start-index, --end-index, --chunk-number-offset for resumable chunked runs

Tests

  • tests/utils/test_save_shard_to_disk.py
  • tests/campaign_tools/test_cvat_create_annotation_tasks_from_folders.py

samiuc and others added 30 commits December 17, 2025 16:17
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: a592458
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: ac622cc
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: 3648bd9

Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: a592458
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: ac622cc
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: 3648bd9
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: c05b85e

Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: a592458
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: ac622cc
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: 3648bd9
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: c05b85e
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: 36044e5

Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: a592458
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: ac622cc
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: 3648bd9
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: c05b85e
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: 36044e5
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: b83a1f0

Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: a592458
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: ac622cc
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: 3648bd9
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: c05b85e
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: 36044e5
I, samiuc <sami.ullah.chat@gmail.com>, hereby add my Signed-off-by to this commit: b83a1f0

Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Merge created_groups and ListHierarchyManager.group_containers into a
single shared all_groups registry. This eliminates a class of duplicate
DocItem refs that arose when list and non-list code paths each created
separate groups for the same path_id.

Also adds _validate_unique_crefs() as a post-conversion assertion that
fires before coordinate scaling.

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
… into cau/upgrade-deps

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
@github-actions

github-actions Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

DCO Check Passed

Thanks @cau-git, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Mar 30, 2026

Copy link
Copy Markdown

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Require two reviewer for test updates

This rule is failing.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

cau-git added 2 commits March 31, 2026 11:29
Adds three scripts for workflows using flat delivery directories
(as opposed to the submission-style layout the existing tools expect):

- convert_flat_cvat_deliveries_to_docling.py: batch-converts flat CVAT
  XML deliveries into DoclingDocument JSON + HTML visualizations, with
  worker parallelism, dry-run, and a structured run report.
- flat_cvat_deliveries_to_hf.py: aggregates flat-batch DoclingDocument
  exports into a HuggingFace-ready parquet dataset.
- cvat_task_batch_uploader_flat.py: uploads flat folder layouts
  (folder/images + folder/annotations.xml) as tasks to a CVAT project.

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
@cau-git cau-git changed the title chore: Dependency upgrades, lots of fixes feat: flat-layout CVAT campaign tools and resilient shard writing Mar 31, 2026
cau-git added 2 commits March 31, 2026 13:12
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
@cau-git
cau-git requested a review from maxmnemonic March 31, 2026 11:20

@maxmnemonic maxmnemonic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cau-git
cau-git merged commit 5c9f3fa into main Mar 31, 2026
9 of 10 checks passed
@cau-git
cau-git deleted the cau/upgrade-deps branch March 31, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants