Skip to content

Fit candidate stamps directly from FITS images - #63

Merged
tpn merged 3 commits into
mainfrom
codex/xfit-fits-input
Sep 28, 2026
Merged

tpn merged 3 commits into
mainfrom
codex/xfit-fits-input

Conversation

@tpn

@tpn tpn commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

xFit currently requires an NPZ containing prepared candidate stamps. This adds an explicit FITS manifest with aligned image planes, candidate positions, masks, and variance, allowing fit-dipoles --fits-reader auto|astropy|xdr to read and crop stamps directly on the GPU.

Local, MPI, and Dragon execution retain the same fit parameters, candidate ordering, numerical solver, and normal artifacts. Distributed workers read after GPU binding and retain stamps across rounds. The coordinator retains audited host stamps across rounds, rechecks complete source hashes, and labels reused audit data. Artifacts distinguish worker reads from coordinator audits; setup and finalization remain outside measured worker fitting time.

This PR depends on the shared reader in #61 and can land independently of #62 and #64. Validation of the extracted #63/#65 candidate: 2,653 CPU tests passed, 184 skipped, and all lint/type hooks passed. Focused xFit, reader, CLI and cleanup tests passed 246 cases, with 29 skipped. The following component and GPU results predate this extraction; the fitting implementation is unchanged. 146 CPU tests passed, with 29 skipped. The GPU-enabled xFit/xScan FITS suite passed all 41 tests, including actual fitting parity between Astropy and xDR. The audit-reuse follow-up passed 46 focused CPU tests (2 GPU cases skipped), including changed source pixels with restored size and timestamp. With 16 candidate stamps from a retained Rubin subtraction, three warm single-GPU repetitions reduced median ingress/crop/validation from 0.764 s to 0.107 s and the complete call with normal artifacts from 10.123 s to 9.410 s. The unchanged fit dominates the remaining time. Four-GB200 shipping MPI and Dragon cases passed with both readers: 16 rounds, exact normal-output/candidate parity, correct GPU placement, and verified audit reuse. Their warm worker batch times are similar because FITS loading occurs once during worker setup.

@tpn
tpn requested a review from melo-gonzo September 26, 2026 22:27
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: NVIDIA/cuPhoton/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3eed8334-11e4-44a5-872d-28acfa2d5862

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@tpn
tpn marked this pull request as ready for review September 28, 2026 16:07
@tpn
tpn force-pushed the codex/xfit-fits-input branch from 3d51f5f to b0946d0 Compare September 28, 2026 17:25

@melo-gonzo melo-gonzo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No introduced issue found in retained stamps, source-hash audit invalidation, or reader-policy propagation. CPU checks passed apart from a reproduced baseline failure; CUDA/MPI/Dragon execution was not rerun locally.

@tpn
tpn force-pushed the codex/xdr-standalone-fits branch from 959d53d to d1dcb3f Compare September 28, 2026 21:01
@tpn
tpn force-pushed the codex/xfit-fits-input branch from b0946d0 to e3356be Compare September 28, 2026 21:01
tpn added 3 commits September 28, 2026 14:42
Signed-off-by: Trent Nelson <trentn@nvidia.com>
Signed-off-by: Trent Nelson <trentn@nvidia.com>
Give filesystem-backed receipts time to arrive while checking cleanup
ordering. Verify that failed-close receipts contain the expected worker
error and include the run summary if receipt collection fails.

Signed-off-by: Trent Nelson <trentn@nvidia.com>
@tpn
tpn force-pushed the codex/xfit-fits-input branch from e3356be to 941c8c2 Compare September 28, 2026 21:42
@tpn
tpn changed the base branch from codex/xdr-standalone-fits to main September 28, 2026 21:43
@tpn
tpn merged commit da64be5 into main Sep 28, 2026
30 of 43 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.

2 participants