Repository navigation
Releases
dataset-desk 0.3.0
Added
- Training-caption commands and options:
scan: scans a--projectinto<out>/scan.jsonland<out>/scan-report.jsonwithout loading an embedder.sidecar-importand--sidecars(onscan,index,report, andcompose): pairs image files with same-stem
.txtcaption sidecars whenrecords/is absent, extracts embedded ComfyUI PNGtEXtgeneration prompts and wave
generation.jsonprompts for prompt-echo checks, reports images without a.txtsidecar instead of inventing text,
and writes<out>/sidecar-records.jsonland<out>/sidecar-import.jsonstrictly under--out.compose(andreport --compose,--manifest-name,--all): assembles training captions into
<out>/captions-manifest.json(style-dataset-lablane-3run_datasetformat) from per-project
caption-rules.json(--caption-config:prefix,classes,class_field,class_pattern,backdrop,
banned_words,drafter,drafter_prompt) and imported seat edits, with per-partwritersprovenance
(config:<file>:<line>,drafter:<id>@<rev>:<prompt sha>,seat:<name>,record:<file>,sidecar:<file>) and
per-itemgate_status("passed","failed", or"unchecked"),flags, andreasonson every manifest item
(preserving keep-all while marking flagged items for downstream trainers). By
default,composeandreport --composedraft only records flagged by the model-free gate into the review
queue (description-review.jsonlanddescription-worksheet.md) — never straight into the training caption — and
leave unflagged records untouched;--allalso drafts unflagged records as side-by-side offers (draft_offerand
draft_offer_writer), and human and sidecar text is never replaced unless a seat edit is imported.import-edits(--worksheet,--seat): re-imports edited rows fromdescription-worksheet.mdinto
<out>/seat-edits.jsonlwithseat:<name>, recording the draft text and drafter writer the seat saw.- Drafter registry (
registry.DRAFTER_REGISTRY): addsqwen3-vl(Qwen/Qwen3-VL-8B-Instructpinned at
0c351dd01ed87e9c1b53cbc748cba10e6187ff3b, Apache-2.0,is_arm_model=False, VRAM-governed,HF_HUB_OFFLINE
aware, raw output logged to<out>/drafter-raw.jsonl) alongside defaultplain-sight(--draft,
--drafter-prompt). - Pool lock tag, fail-closed renamed-copy sources, user config, and
pool_detection:"multimodal_pool"project tag incaption-rules.json,project.json,desk-config.json, or
--caption-config.- Locked-pool hash/directory configuration via
--pool-manifest/DATASET_DESK_POOL_MANIFEST,
--locked-pool-dir/DATASET_DESK_POOL_DIRS, and user config (DATASET_DESK_USER_CONFIG,
~/.config/dataset-desk/config.json, or%APPDATA%\dataset-desk\config.json). - Per-run
pool_detection(status: "on" | "off", configured pools,stem_checkstatus, per-pool and per-source
image-hash counts, and source paths — never hash values) recorded across image, caption, and text commands. When a
hashes-only manifest provides no image stems or paths,pool_detectionrecords"stem_check": "no stems configured"(or names the stem-less pools) and text commands emit a singlestderrwarning noting that.txt
sidecar stem matching had no stems to compare.
Breaking changes
- Stderr warning when renamed-copy detection is
off: every--projectcommand (scan,index,dupes,
search,coverage,report,sidecar-import,compose,import-edits) and every text command (text-index,
text-dupes,text-search,lineage) prints a single warning line tostderrwhen no pool manifest or locked-pool
folder is configured. - Project and source config files are read and validated:
caption-rules.json,project.json,desk-config.json
(and--caption-configwhen passed) are read on--projectand--source/--rnd-datacommands; invalid JSON, a
non-object file, a non-string or unknownmultimodal_pool(INPUT_BAD_ARGUMENT), acaption-rules.jsonschema
error, or amultimodal_pooltag conflicting with a locked folder'srealpathname (PERM_LOCKED_POOL) exits1. - User config and pool sources fail closed on malformed or empty inputs: the user config
(DATASET_DESK_USER_CONFIGwhen non-empty, else~/.config/dataset-desk/config.jsonor
%APPDATA%\dataset-desk\config.json) and any configured pool manifest, environment variable, or pool folder are read
on every command; malformed JSON, a non-object user config or manifest, a non-object"pools"value
(INPUT_BAD_ARGUMENT), or any explicitly configured but empty pool source — an empty manifest or empty user
config, an emptypool_manifestorlocked_pool_dirs/pool_dirsin user config or a manifest, an empty or
separator-onlyDATASET_DESK_POOL_DIRSor--locked-pool-dir, an emptyDATASET_DESK_POOL_MANIFESTor
--pool-manifest, or any configured pool entry or folder yielding zero image hashes (INPUT_EMPTY_POOL_SOURCE) —
fails every command with exit1. SetDATASET_DESK_USER_CONFIG=""to ignore user config files. - Fail-closed pool lock across all project and text commands (links included): an untagged
--projector
--source/--rnd-datafolder sharing any imagesha256with a configured pool (following symlinks and Windows
directory junctions viaenumerate_project_images) is refused (PERM_LOCKED_POOL, exit1) for all commands —
scan,dupes,--backend none,sidecar-import,compose, andtext-*included — unless
--allow-multimodal-poolis passed:- One shared directory-pruning rule (
desk.prune_project_walk_dirs) governs both project reads andsha256pool
hashing (pruning.gitand__pycache__at every depth and only top-level<project>/records, so images under
outputs/records/oroutputs/<wave>/records/are hashed and refused identically to scan reads). - Every
asset_pathnamed in<project>/records/*.jsonis hashed regardless of file extension, refusing renamed
byte-copies such as.dat. - Explicitly configured empty pool sources outside a manifest (empty
locked_pool_dirs/pool_manifestin user
config, or separator-onlyDATASET_DESK_POOL_DIRS) fail closed (INPUT_EMPTY_POOL_SOURCE) instead of falling back
to"off". - Text commands (
text-index,text-dupes,text-search,lineage) also refuse untagged sources or cached text
indexes containing.txtfiles whose stem matches an image of a locked pool, and refuse embedding backends on named
or tagged locked pools without--allow-multimodal-pool. Folder-name pool checks comparerealpathrather than
abspath.
- One shared directory-pruning rule (
- New output files under
--outand newpool_detection/ provenance fields: commands writepool-detection.json,
scan-report.json,<cmd>-<backend>.json(dupes,search,coverage,text-dupes,text-search,lineage),
drafter-raw.jsonl,seat-edits.jsonl,captions-manifest.json,sidecar-import.json, and
sidecar-records.jsonlunder--out;<out>/<backend>/meta.json,<out>/<backend>/text/meta.json, and
description-review.jsonlgainpool_detection(and review rows gain provenance fields includingwriters,
parts,draft,drafter_writer,draft_offer,draft_offer_writer,seat_edit,seat_id, and
final_caption). New 0.3.0 JSON-stdout commands
(scan,sidecar-import,import-edits) includepool_detectionin stdout JSON; existing 0.2.x JSON-stdout
commands (dupes,text-dupes,lineage) keep their stdout JSON shapes unchanged. --drafttakes an optional value;composedrafts only flagged records into the review queue:--draftnow
accepts an optional drafter name (none,fake,plain-sight,florence2,qwen3-vl), and a bare--draftmeans
plain-sight.compose(andreport --compose) drafts only records flagged by the model-free gate into the review
queue (usingrules.drafterif set incaption-rules.json, elseplain-sight; pass--draft noneto skip
drafting), leaving unflagged records untouched and never writing unedited drafts into training captions;--all
offers drafts beside unflagged originals (draft_offer/draft_offer_writer), and human and sidecar text is never
replaced without an imported seat edit.- Python API, provenance strata, and error codes:
desk.check_multimodal_poolreturns thepool_detectiondict
(wasNone);desk.check_drafter_pooldefaultsgetattr(drafter, "is_arm_model", True)so unknown drafter objects
are treated as arm models; sidecar descriptions carryauthor_kind: "sidecar"(never"human") and"sidecar"is
counted instrata_counts; flagged drafted review rows aligncaption_stratumwithauthor_kind
("captioner_assisted");audit_recordsinitializeswritersas alist[str]andimport-editsappends
seat:<name>ontowritersrather than overwriting; addedMODEL_REVISION_MISMATCH,DEP_DRAFTER_OFFLINE, and
INPUT_EMPTY_POOL_SOURCE; updated theINPUT_UNKNOWN_DRAFTERhint.
Known limits
- Renamed-copy detection matches images by file
sha256: neither a copy made only of new images (none shared with a
locked pool) nor a resized, re-encoded, or metadata-stripped copy matches bysha256. Tag such projects with
"multimodal_pool"incaption-rules.jsonorproject.json.
dataset-desk 0.2.2
0.2.1 was tagged on GitHub but never published to PyPI. 0.2.2 ships 0.2.1's changes, listed below, with one
security update to the release pipeline.
Security
- The release workflow now pins
pypa/gh-action-pypi-publishv1.14.3 (commit 7245906f), which includes the fix for
GHSA-5xjx-3w67-w9x9
(pypa#427: certifi and sigstore upgraded) and hash-checks the action's
runtime dependencies. It follows the
eMudhra/emSign CA certificate incident
(2026-10-20). 0.2.1's release run, which used v1.14.2, was stopped before upload.
Changed
-
registry.REGISTRY: thevram_mibfigures are now conservative whole-card figures. Each is the larger of the
highest real-run peak measured and the earlier reserved figure plus that backend's measured CUDA context, on an
RTX 5090, soneed_mib = vram_mib + 1,024 MiBcovers CUDA context overhead on a shared GPU.- A real run's peak can exceed a short synthetic one, because the allocator's reserved pool grows over many
batches; the 1,024 MiB margin is the buffer for that. - Other cards and corpora may differ.
backend vram_mib source dinov2 1,272 registered 636 + context 636 siglip2 6,207 0.2.0 dogfood's whole-card peak on real images gte-modernbert 7,112 registered 6,544 + context 568 bge-m3 8,442 0.2.0 dogfood's whole-card peak on rnd-data text eg2 13,119 registered 12,550 (multimodal) + context 569 qwen3-emb-0.6b 15,065 registered 14,470 + context 595 - A real run's peak can exceed a short synthetic one, because the allocator's reserved pool grows over many
-
desk.scan: about 2× faster per image on one thread, with identical results (scan.jsonlrows andSCAN_V = 2
are unchanged). The first uncached scan runs in parallel under--threads(aProcessPoolExecutorwhen
threads > 1and there are at least 8 uncached images), and since the CLI's default is--threads 4, a default
run is now parallel. -
description_gate.audit_records: replaced the full-postings Jaccard candidate loop with rare-first prefix filtering
(L - ceil(tau * L) + 1), producing identicalnear_pairsandnear_groups. -
desk.mid_rankanddesk._rank_descriptions: with_RANK_TIE_EPS = 1e-6, tied image vectors now stay tied
whatever the BLAS block size. -
desk.lineage: keeps only the top k pairs per file name, in bounded memory.- Its cosines come from a blocked float32 matrix product.
- So a pair whose cosine sits on a 4-decimal rounding boundary can differ from 0.2.0 by 0.0001, and the order of
such near-ties can differ with it.
-
desk.pairs_at_least,desk.top1_percentiles,desk.coverage: bounded block sizing via_block_rowsand
single-sliceXA = img[A]. -
backends.transformers_warnings_off: also disables and restores transformers' weight-loading progress bars across all model loaders.
Changed field: max_content_jaccard
description_gate.audit_records: a record'smax_content_jaccardis now the exact value at ≥ 0.85 andnull
below. The flags are unchanged.
Fixed
backends._vram_info_mib: catches CPU-only torch builds when--device cudais requested and raisesENV_NO_CUDA_TORCHwith a hint to install CUDA torch fromhttps://download.pytorch.orgor pass--device cpu.desk.check_multimodal_pool,desk.index,desk.report: image-only backends (dinov2) no longer require--images-onlyon locked multimodal benchmark pools when called from Python or CLI.
dataset-desk 0.2.1
Not published to PyPI. Superseded by 0.2.2 (publish-action security update, GHSA-5xjx-3w67-w9x9). 0.2.2 carries all of these changes.
Changed
-
registry.REGISTRY: thevram_mibfigures are now conservative whole-card figures. Each is the larger of the
highest real-run peak measured and the earlier reserved figure plus that backend's measured CUDA context, on an
RTX 5090, soneed_mib = vram_mib + 1,024 MiBcovers CUDA context overhead on a shared GPU.- A real run's peak can exceed a short synthetic one, because the allocator's reserved pool grows over many
batches; the 1,024 MiB margin is the buffer for that. - Other cards and corpora may differ.
backend vram_mib source dinov2 1,272 registered 636 + context 636 siglip2 6,207 0.2.0 dogfood's whole-card peak on real images gte-modernbert 7,112 registered 6,544 + context 568 bge-m3 8,442 0.2.0 dogfood's whole-card peak on rnd-data text eg2 13,119 registered 12,550 (multimodal) + context 569 qwen3-emb-0.6b 15,065 registered 14,470 + context 595 - A real run's peak can exceed a short synthetic one, because the allocator's reserved pool grows over many
-
desk.scan: about 2× faster per image on one thread, with identical results (scan.jsonlrows andSCAN_V = 2
are unchanged). The first uncached scan runs in parallel under--threads(aProcessPoolExecutorwhen
threads > 1and there are at least 8 uncached images), and since the CLI's default is--threads 4, a default
run is now parallel. -
description_gate.audit_records: replaced the full-postings Jaccard candidate loop with rare-first prefix filtering
(L - ceil(tau * L) + 1), producing identicalnear_pairsandnear_groups. -
desk.mid_rankanddesk._rank_descriptions: with_RANK_TIE_EPS = 1e-6, tied image vectors now stay tied
whatever the BLAS block size. -
desk.lineage: keeps only the top k pairs per file name, in bounded memory.- Its cosines come from a blocked float32 matrix product.
- So a pair whose cosine sits on a 4-decimal rounding boundary can differ from 0.2.0 by 0.0001, and the order of
such near-ties can differ with it.
-
desk.pairs_at_least,desk.top1_percentiles,desk.coverage: bounded block sizing via_block_rowsand
single-sliceXA = img[A]. -
backends.transformers_warnings_off: also disables and restores transformers' weight-loading progress bars across all model loaders.
Changed field: max_content_jaccard
description_gate.audit_records: a record'smax_content_jaccardis now the exact value at ≥ 0.85 andnull
below. The flags are unchanged.
Fixed
backends._vram_info_mib: catches CPU-only torch builds when--device cudais requested and raisesENV_NO_CUDA_TORCHwith a hint to install CUDA torch fromhttps://download.pytorch.orgor pass--device cpu.desk.check_multimodal_pool,desk.index,desk.report: image-only backends (dinov2) no longer require--images-onlyon locked multimodal benchmark pools when called from Python or CLI.
dataset-desk 0.2.0
Added
-
Text and code input:
text-index,text-dupes,text-searchandlineageread a--sourcefolder or an
rnd-data checkout.- rnd-data's private companion and blob stores are refused.
- Only relative paths are printed.
-
An embedder registry with six models, each pinned to a full commit, with its licence and VRAM figure:
- EmbeddingGemma 2 and SigLIP2;
- bge-m3, Qwen3-Embedding 0.6B and gte-modernbert;
- DINOv2.
Each task has a default (
--task): bge-m3 for text, EmbeddingGemma 2 for code, DINOv2 for duplicates, SigLIP2 for
image search. -
A VRAM governor.
- It refuses a load when used plus needed memory would pass
--vram-budget(default 26,624 MiB). --waitpolls until the load fits.- Every refusal names used, free, needed and the budget.
- It refuses a load when used plus needed memory would pass
-
EmbeddingGemma 2 is used the way its model card says:
- a task prefix for each role, with file names as document titles;
- text-only loading for text commands;
--dim(768, 512 or 256), and--vision-tokens.
-
Chunks counted by each model's own tokenizer: up to the model's limit (8,000 or 8,192 tokens), at most 8 per
file. -
Duplicate output names its rule:
dupesreportsruleandview_pairs_skipped, andtext-dupesreports
top1_percentiles. -
A mirror-aware dHash:
dhash_flip, computed from the flipped image.
Changed
- Duplicate rules, from the studio's calibration on the RTX 5090. Every threshold is marked provisional.
- On a DINOv2 index, an image pair is a duplicate when
(cos ≥ 0.94 and flip-aware dHash within 44 bits) or cos ≥ 0.985. That's recall 0.91 with no cross-project false positives on the studio's pool. - Other backends use the mirror-aware dHash within 26 bits, plus cosine ≥ 0.95.
- On a DINOv2 index, an image pair is a duplicate when
- Two views of one object are never duplicates. The view comes from the record's
provenance.asset_idand
render_id, or from a file name like<asset>__y<yaw>_e<elev>. text-dupesdefaults: 0.98 on bge-m3, and 0.95 for--task codeon EmbeddingGemma 2. Any other backend needs
--semantic.- The registered VRAM figures for the text models are long-input peaks (bge-m3 7,488, Qwen3 14,470,
gte-modernbert 6,544 MiB). - Caches record and check every setting that changes a vector: revision, dim, vision tokens, max tokens, chunks,
role and dtype. A non-default--dimor--vision-tokensgets its own folder. scan.jsonlrows are versioned (scan_v: 2). Older rows are recomputed.
Fixed
- Large projects no longer run out of memory or take hours. Measured on synthetic sets, before → after:
- the near-duplicate search (dHash, flip-aware) was a Python loop over every pair: 27 s at 4,000 images, about 5
hours at 100,000. It is now vectorised in blocks: 0.7 s at 4,000, 4.4 minutes at 100,000. Same pairs, same order. look_fitbuilt an n × n × 30 array: 3.6 GB at 4,000 images, so it crashed long before 100,000. It now works in
blocks with a matrix-product distance: 3.1 minutes at 100,000, under 400 MB.outliersbuilt the full n × n similarity matrix (about 76 GB at 100,000). It now works in blocks: 21 s at
50,000.- The description gate kept every pair of identical captions in memory, and compared every description with every
other one. It now indexes content words, so only descriptions that share a word are compared: about 6× faster,
with identical output (checked on 300 random record sets). report's swap check no longer builds an m × m comparison, and it and the caption check rank descriptions in
blocks, so large described sets no longer run out of memory or take hours.
- the near-duplicate search (dHash, flip-aware) was a Python loop over every pair: 27 s at 4,000 images, about 5
- Every pairwise block is capped at about 64 MiB (
BLOCK_BYTES).
Known limits
- The description gate's exact
max_content_jaccardfor every record is still quadratic when a few content words
appear in most descriptions (74 s at 32,000 records on a heavy-vocabulary synthetic set). A faster exact threshold
check that changes what that field reports is a design question, open.
dataset-desk v0.1.3
Fixed
dataset-desk[models]now installssentence-transformers[image]. Without it, a fresh install couldn't load
EmbeddingGemma 2's processor (found by the studio's calibration run on 2026-10-20).
Changed
- Install from PyPI:
pip install dataset-desk, orpip install "dataset-desk[models]".
Added
release.yml: publishing a GitHub release builds the wheel and sdist, checks them withtwine check, and publishes
to PyPI by trusted publishing from thepypienvironment, with SLSA provenance. It never fires on a push.
Notes
- No NumPy upper bound. The desk doesn't use numba. An environment that adds
numba-cudabeside it needs
numpy>=2.4,<2.5until numba-cuda supports NumPy 2.5 (studio smoke rung on the RTX 5090, 2026-10-20).
dataset-desk v0.1.2
Added
report --count-tokensruns the gate's 64-token test with the cached SigLIP2 tokenizer, offline. Before it, the
command line never passed a token counter, so a record that passed every other test stayedunchecked.- Error code
DEP_TOKENIZER_MISSING(exit 1) when--count-tokenscan't find the tokenizer.
Fixed
reportno longer stops when--outand the project are on different Windows drives: links fall back to
file://URIs where a relative path can't cross drives.- The tokenizer load no longer logs the bos/eos config warning, like the model load in 0.1.1.
Changed
- 152 offline tests; line coverage 96%, CI floor 90.
dataset-desk v0.1.1
Fixed
- Model loads pass
dtypeinstead of the deprecatedtorch_dtype(SigLIP2, and EmbeddingGemma 2'smodel_kwargs). - SigLIP2 loads no longer log transformers' bos/eos token-id warning. Its published config sets those ids outside
the text vocabulary, and the desk never uses them. Errors still show.
Changed
- The
modelsextra now needstransformers>=4.56(the first withdtype) andsentence-transformers>=5. - 145 offline tests; line coverage 96%, CI floor 90.
dataset-desk v0.1.0
The first public release: a prototype, tested offline and not yet calibrated on real data.
Added
dataset-deskcommand withindex,dupes,search,coverageandreport.- Backends: EmbeddingGemma 2 (
eg2), SigLIP2 so400m (siglip2), andnone, the torch-free lite tier. - Duplicates in three tiers: byte-identical (sha256), near (256-bit dHash) and semantic (embedding cosine).
- A 30-number look channel (palette, tone, native-resolution texture), and outliers ranked by content and by look.
- The model-free description gate: prompt echo, a wrapped subject line, length, pool duplicates and the SigLIP2
64-token cap, with a frozen stopword list whose sha256 is exposed. description-review.jsonland a blind re-description worksheet: each flagged image beside its nearest siblings,
with no prompt or old text in view.- An optional blind drafter through plain-sight (Florence-2), offline at a pinned revision, recorded as
captioner_assisted. - Guards:
--outmay not sit inside the project; a GPU needs--grant; locked benchmark projects refuse description
embeddings and model-based acceptance without--allow-multimodal-pool. - Structured errors (
error <CODE>: <message>plus a hint), exit codes 0/1/2, and--debugfor stack traces. - 142 offline tests at 96% line coverage, with CI holding a 90% floor.