Release: SigLIP concept crops + max-over-bag + agent redeploy-survival #154

Merged
bvandeusen merged 3 commits from dev into main 2026-06-30 08:46:21 -04:00
Owner

Promote dev→main (CI green on dev run #1713, all four lanes incl. integration).

Ships:

  • SigLIP concept crops + max-over-bag scoring (#114) — better recall on small/local concepts; model-agnostic (server announces the embedder in the lease). No migration; backward-compatible.
  • Agent redeploy-survival — rides out an unreachable curator (transport errors no longer fail/poison jobs; capped lease backoff; AUTO_START resumes after a container restart).

Deploy after merge:

  • Agent (desktop): cd ~/Documents/fc-gpu-agent && docker compose pull && docker compose up -d
  • Server (optional — crops changes are inert until the agent produces concept regions): force re-pull web+ml :latest.

🤖 Generated with Claude Code

Promote dev→main (CI green on dev run #1713, all four lanes incl. integration). **Ships:** - SigLIP concept crops + max-over-bag scoring (#114) — better recall on small/local concepts; model-agnostic (server announces the embedder in the lease). No migration; backward-compatible. - Agent redeploy-survival — rides out an unreachable curator (transport errors no longer fail/poison jobs; capped lease backoff; AUTO_START resumes after a container restart). **Deploy after merge:** - Agent (desktop): `cd ~/Documents/fc-gpu-agent && docker compose pull && docker compose up -d` - Server (optional — crops changes are inert until the agent produces concept regions): force re-pull web+ml `:latest`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 3 commits 2026-06-30 08:46:15 -04:00
Lift recall on small/local concepts (glasses, cum, stomach-bulge, xray,
lactation) that the whole-image SigLIP vector washes out: the GPU agent now
embeds figure crops with SigLIP too, stored as kind='concept' regions, and the
suggestion rail scores each image as a BAG (whole-image + every concept crop),
taking each head's MAX over the bag. The whole-image vector is always in the
bag, so this can never score lower than before.

Model-agnostic by construction: the server ANNOUNCES the embedding model
(HF name + version) in the lease, so the agent loads whatever the heads were
trained in and stays in lock-step — a model swap is a server setting + a
re-embed migration, never an agent change.

- agent: model-agnostic CropEmbedder (torch/transformers get_image_features,
  fp16 on CUDA, inference-locked); worker branches on job.task — 'ccip' emits
  figure(CCIP)+concept(SigLIP) in one pass, 'siglip' emits concept-only so the
  back-catalogue backfill never churns figure/CCIP regions; torch cu124 +
  transformers in the image.
- server: lease announces embed_model_name/embed_version; score_image is
  max-over-bag (version-filtered region embeddings); enqueue_gpu_backfill
  'siglip' gates on a missing concept region (drains the back-catalogue,
  retries failures, no double-enqueue); daily siglip-backfill beat; UI button;
  /api/ccip/overview reports images_with_concept_siglip.
- v1 scope: suggestion rail only — auto-apply stays whole-image (conservative;
  heads' thresholds were calibrated on whole-image). Bulk-apply bag = follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ttrj5P7upUTueSfoJcxEqa
For redeploying curator while away with nobody to restart the agent:

- _process now distinguishes a TRANSPORT error (curator down/redeploying, 5xx,
  401/403/408/409/429, or our lease reclaimed mid-flight) from a genuine job
  fault. On a transport error it hands the job back (best effort) and signals
  the loop to back off — instead of calling fail(), which would burn the job's
  server-side attempt budget (MAX_ATTEMPTS=3) and permanently error good jobs
  across a redeploy. Job-specific 4xx (404 image gone) still fail so they don't
  re-lease forever.
- lease loop retries with capped exponential backoff (poll_idle → 60s) and
  resets on the first successful lease, so a long outage is gentle and recovery
  is automatic within ≤60s of curator returning. Sleeps are interruptible so
  Stop / pool-shrink stays responsive.
- AUTO_START env (default on in compose) resumes the worker on container start,
  so a host reboot / crash-restart (restart: unless-stopped) self-heals with
  nobody at the desktop.
- control UI shows a "waited out" counter + an "curator unreachable, holding
  work" banner so the recovering state reads as recovery, not failure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ttrj5P7upUTueSfoJcxEqa
Merge pull request 'feat(tagging): SigLIP concept crops + max-over-bag scoring (#114)' (#153) from feat/siglip-concept-crops into dev
CI / lint (push) Successful in 3s
CI / frontend-build (push) Successful in 18s
CI / backend-lint-and-test (push) Successful in 27s
CI / integration (push) Successful in 3m29s
715e276c03
bvandeusen merged commit 3138f912fd into main 2026-06-30 08:46:21 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledCurator#154