Skip to content

Persist ngmix epoch-cut counts; tile cleaning no longer needs module logs - #955

Merged
cailmdaley merged 6 commits into
developfrom
feat/epoch-cuts-persist
Oct 25, 2026
Merged

cailmdaley merged 6 commits into
developfrom
feat/epoch-cuts-persist

Conversation

@cailmdaley

@cailmdaley cailmdaley commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

We preserve ngmix's epoch-cut counts in persistent tile manifests, so tile cleaning can reclaim scratch without retaining module logs.
These are chunk/tile diagnostics, including rejected epochs and objects that never reach the final catalogue; no scientific cuts or catalogue values change.

Durable counts and cleanup

  • Each ngmix chunk's completeness check captures its single epoch cuts: summary before temporary output disappears. Missing, malformed or ambiguous summaries fail the check rather than becoming zero counts.
  • tile_make_cat aggregates the full configured chunk set and publishes tile_make_cat.json beside final_cat-<tile>.hdf5. Its epoch_cuts record holds schema_version, n_chunks, per-chunk counts and tile totals for considered, masked_fraction, central_veto, failed and objects_emptied.
  • clean_tile requires a valid persistent catalogue and count manifest before deleting scratch. Existing survivor checks, tombstone records and symlink-safe deletion remain in force.

Counts represent sequential vetoes, not independent cut incidences.
objects_emptied counts objects whose considered epochs were all removed before fitting.
Keeping these totals in a manifest preserves their scope and chunk coverage without changing the catalogue schema.

Deployment

Deploy at a campaign boundary.
The shared completeness/helper hash changes rule parameters across stages; make-cat and cleanup dependencies and shell commands also change.
Resuming an existing campaign against this workflow can schedule science stages again.

For an idle existing campaign with retained logs, use workflow/scripts/backfill_epoch_cuts.py --run-dir <run> --products-dir <products> --n-chunks <N> --dry-run first.
The dry run writes and deletes nothing.
Without --dry-run, the tool atomically publishes the count manifest before reclaiming scratch through the same cleaner.
Don't run it alongside campaign jobs or another cleaner.
Historical FITS and HDF5 catalogues are supported; missing catalogues are skipped and ambiguous catalogues or incomplete evidence are refused.
Production backfill has not been exercised by this replay.

workflow/README.md documents the schema and usage.
tests/unit/test_epoch_cuts_persist.py covers parsing, chunk coverage, durable publication, cleanup refusal and backfill safety.

— Codex on behalf of Cail.

cailmdaley and others added 5 commits October 25, 2026 18:05
Capture each ngmix summary before temp cleanup, aggregate the full chunk set at make-cat, and publish the manifest beside final_cat. Refuse reclamation without validated durable counts. This changes completeness params across stages and the make-cat/clean shell fingerprints; deploy between campaigns, not as an unreviewed resume.

Co-Authored-By: GPT-6.1 Sol via Claude Opus 5.5 <noreply@anthropic.com>
Keep clean_tiles enabled by default, remove the stale false-default comment, and document the ngmix summary prerequisite, persistent schema, backfill procedure and campaign-boundary deployment.

Co-Authored-By: GPT-6.1 Sol via Claude Opus 5.5 <noreply@anthropic.com>
Use frozen run defaults, require persisted final_cat and complete successful chunk evidence, publish counts atomically, then reuse clean_tile.reclaim. Dry-run uses the same whitelist traversal and never follows links. smk-b01 dry-run: 25 tiles, 53,290,513,588 logical bytes (49.631 GiB), no skips or refusals; nothing written or deleted.

Co-Authored-By: GPT-6.1 Sol via Claude Opus 5.5 <noreply@anthropic.com>
…kfill

Cover missing/ambiguous summaries, full chunk coverage, zero counts, duplicate log copies, stable manifest mtimes, cleanup refusal, read-only byte accounting, publication-before-cleaning and idempotent retries. Include the exact PR #922 producer line. Container verification after restacking: 199 passed, 1 skipped across targeted, structural and ngmix producer suites; ASTRA validation passes.

Co-Authored-By: GPT-6.1 Sol via Claude Opus 5.5 <noreply@anthropic.com>
@cailmdaley
cailmdaley changed the base branch from feat/masked-pixels to develop October 25, 2026 22:05
@cailmdaley
cailmdaley force-pushed the feat/epoch-cuts-persist branch from d731900 to d6bb5fa Compare October 25, 2026 22:06
@cailmdaley
cailmdaley merged commit 902c32f into develop Oct 25, 2026
2 checks passed
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.

1 participant