Skip to content

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

Open
cailmdaley wants to merge 4 commits into
feat/masked-pixelsfrom
feat/epoch-cuts-persist
Open

cailmdaley wants to merge 4 commits into
feat/masked-pixelsfrom
feat/epoch-cuts-persist

Conversation

@cailmdaley

Copy link
Copy Markdown
Contributor

Summary

Tile cleaning can reclaim scratch without losing ngmix's epoch-cut counts.
This PR is stacked on #922 (feat/masked-pixels), which writes the epoch cuts: summaries.
Production currently sets clean_tiles: false only to keep those log lines, leaving roughly 2.1 GB per finished tile on /scratch (about 50 GiB per 25-tile batch).

Changes

  • Capture each chunk's summary in its completeness manifest before temporary chunk directories disappear.
  • Sum the full configured chunk set into tile_make_cat.json and publish it beside the persistent final_cat-<tile>.fits.
    Its epoch_cuts record holds the schema version, chunk count, per-chunk counts and tile totals for considered, masked_fraction, central_veto, failed and objects_emptied.
  • Gate clean_tile on a validated persistent manifest; missing, malformed or ambiguous summaries refuse cleanup rather than becoming zeros.
  • Add workflow/scripts/backfill_epoch_cuts.py for idle existing campaigns, with a read-only dry run and atomic publication before optional cleanup.

These are chunk/tile diagnostics, including rejected epochs and objects that never reach the final catalogue.
A manifest preserves that scope and the complete chunk coverage without repeating tile totals in catalogue columns or changing the catalogue schema.
No scientific cuts or catalogue values change.

Validation

The earlier smk-b01 dry run covered 25 finished tiles (400 chunks) and would free 49.6 GiB; nothing was written or deleted.
It counted 3,110,928 considered epochs, 131,428 masked-fraction rejections (4.2%), 65,427 central vetoes (2.1%), 3 failures and 10,257 objects emptied of epochs.
This is consistent with the single-tile check on 202.301 (2.0% central veto; 6.1% total rejection).

After restacking, the targeted, structural and ngmix producer tests pass in shapepipe-develop-240b37e4.sif with src/ shadowed through PYTHONPATH: 199 passed, 1 skipped.
The parser regression includes the exact #922 line: epoch cuts: considered=8181 masked_fraction=235 central_veto=271 failed=0 objects_emptied=16.
ASTRA validation and git diff --check pass.

Deployment

Deploy at a campaign boundary.
The shared helper hash changes completeness parameters across stages, and the make-cat/clean outputs and shell commands change, so resuming an existing campaign can trigger reruns.
Use the standalone backfill for existing campaigns instead of resuming their DAG against this code; inspect --dry-run first.
The real backfill has not been run.
Usage and the persistent schema are documented in workflow/README.md.

GPT-6.1 Sol via Claude Opus on behalf of Cail.

🤖 Generated with Claude Code

cailmdaley and others added 4 commits October 10, 2026 10:16
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>

This branch has not been deployed

No deployments
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