Reconcile stack: bring Curation (#10) + Data Browser (#11) to main#12
Merged
Conversation
…datasheets
Adds curation passes over the catalog (no files deleted — verdicts written to
the DB and reversible):
- `almendra db curate` runs three passes:
- dedup: perceptual-hash (pHash) near-duplicate detection, greedy by
representative; flags later copies is_good=false (`duplicate of <id>`).
- quality: flags too-small / near-blank (low pixel std-dev) crops.
- lossy labels: lowers trust on documented lossy source mappings
(roboflow Scorched→defect_unspecified→0.2, Empty→hull_husk→0.3).
- `--dry-run` reports without writing; reasons stored in Bean.notes.
- On the real data this flags 196 near-duplicates (1507→1311 good) and
down-weights 222 labels; export drops the flagged beans.
- `db audit` enriched: not-good-by-reason breakdown + label-trust histogram.
- Per-source datasheets in docs/datasheets/ (full for the ingested
roboflow_robusta_defects incl. curation findings; briefs for the rest);
README index links them. kaggle_17defects documented as license-blocked.
- Settings UI: source status/license summary table + a banner flagging
license-blocked sources.
Tests in tests/test_curate.py (flagging + export exclusion, idempotency,
dry-run writes nothing). Stacked on the Step-1 catalog branch.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
New Streamlit "Data" page to browse the catalog and manually check the data: - Filters: source, split, primary defect, provenance, quality (good/not-good), and label-trust bucket. - Thumbnail gallery (paginated) with class + ext_id captions; not-good beans flagged⚠️ . - Per-bean detail: all views, every defect (class/primary/label_source/trust), and the lot provenance (species, variety, process, farm, altitude, dates…). Read queries live in `almendra.db.queries` (Streamlit-free, unit-tested). The page degrades gracefully if the `catalog` extra or the DB file is absent. Also: CI now installs `--extra catalog` so the catalog/curation/browse tests actually run (they were importorskip-skipped before). Tests: tests/test_browse_queries.py (filters, pagination, detail) + browse added to the UI smoke set. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The E2E sandbox now builds its catalog from the fixture manifest (harness
`build_catalog` runs `almendra db migrate`), and the flow navigates to the new
Data page after Predict, asserting the browser renders with beans ("Data
browser" + "Showing N of M"). Exercises `db migrate` end-to-end too.
Passes in ~34s; recording covers the added step.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Data Browser UI — visually inspect & spot-check the catalog
This was referenced May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Step 1–3 PRs were stacked (#9 ← #10 ← #11). #9 merged to
main, but #10 and #11 were merged into their stacked base branches (data-catalog,data-curation) rather thanmain. Somaincurrently has only the catalog (#9); the curation (#10) and Data Browser (#11) work is stranded indata-curation.This PR promotes
data-curation→main, landing the missing work. It's purely additive overmain(no catalog changes are touched):db curate(dedup, quality, lossy-label trust), enricheddb audit, per-source datasheets, Settings UI status.Datapage +db.queries+ the E2E Data sanity step.--extra catalog.Everything here was already reviewed in #10 and #11.
After merging
mainwill be whole (catalog + curation + browser). Future work (multi-label model) branches off this. Going forward: avoid deep stacks — merge bottom-up, or use one branch.🤖 Generated with Claude Code