Skip to content

remove unused settings - #134

Merged
stevehenke merged 1 commit into
haskels/ptycho-fm-backendfrom
ptycho-fm-cleanup
Aug 18, 2026
Merged

remove unused settings#134
stevehenke merged 1 commit into
haskels/ptycho-fm-backendfrom
ptycho-fm-cleanup

Conversation

@stevehenke

Copy link
Copy Markdown
Contributor

Remove settings that are not read in the subprocess.

@stevehenke
stevehenke requested review from haskels and mdw771 August 18, 2026 15:22

@haskels haskels 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.

Seems good to merge. All removed settings seem to indeed be unused by Ptychodus's own subprocess

@stevehenke
stevehenke merged commit 82f239e into haskels/ptycho-fm-backend Aug 18, 2026
@stevehenke
stevehenke deleted the ptycho-fm-cleanup branch August 18, 2026 19:40
stevehenke added a commit that referenced this pull request Aug 18, 2026
* add PtychoFM reconstructor backend

Mirrors the ptychopinn_torch subprocess-isolation pattern for the
ptycho-vit foundation model. Parent-side factory produces a
SubprocessReconstructor whose child entry points (run_reconstruct /
run_train) are the only ptychodus modules that import torch or
ptycho_vit. The parent hands the child a pre-built nested config dict
(no framework types cross the pickle boundary) plus the raw payload.

Inference batches diffraction amplitudes through PtychoViT, applies a
central crop to each patch, and stitches phase + amplitude back onto
the object grid via place_patches_fourier_shift, folding the result
into layer 0 as amp*exp(1j*ph). Training runs a minimal single-device
loop (no DDP, no mlflow, no wandb) with random_split train/val and
saves the best-val checkpoint to output_path/best.pth.

Registers Unsupervised + Supervised modes via the reconstructor library
and wires a PyQt controller with Data/Model/Training/Inference groups.
When ptycho_vit is absent, developer mode falls back to NullReconstructor
so the GUI still boots.

Optional dep ptycho-fm = ["ptycho-vit"] added to pyproject.toml; the
test_parent_config_builders discipline gate covers ptycho_fm too.

* ptycho_fm: export training data as paired HDF5 for ptycho_vit

Replaces the NPZ writer with a two-HDF5 exporter matching what
ptycho_vit.CombinedDataset actually reads: <stem>_dp.hdf5 with a
'dp' dataset of diffraction patterns, and <stem>_para.hdf5 with
'object', 'probe', 'probe_position_x_m', and 'probe_position_y_m'
plus a 'pixel_height_m' attr on 'object'. file_path is treated as
a stem (the picked filename itself is not created).

* ptycho_fm: point uv at the local ptycho-vit checkout

ptycho-vit isn't on a package registry, so declaring the ptycho-fm extra
without a source made `uv sync` fail to resolve the lock (the same reason
ptychopinn has a matching entry). Mirror that pattern.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* remove unused settings (#134)

---------

Co-authored-by: Samuel Haskel <haskels@anl.gov>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

3 participants