remove unused settings - #134
Merged
Merged
Conversation
haskels
approved these changes
Aug 18, 2026
haskels
left a comment
Collaborator
There was a problem hiding this comment.
Seems good to merge. All removed settings seem to indeed be unused by Ptychodus's own subprocess
mdw771
approved these changes
Aug 18, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove settings that are not read in the subprocess.