Use config.json instead of files in postprocessing - #314
Draft
max-models wants to merge 5 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR switches the simulation metadata persistence/ingestion path from multiple pickle “*.bin” artifacts to a single config.json, and updates post-processing to reconstruct simulation configuration from that JSON when no parameters.py is present.
Changes:
- Stop writing multiple pickled config artifacts (
*.bin) and instead write aconfig.jsonbased onSimulation.to_dict(). - Update post-processing parameter import logic to load
EnvironmentOptions,Time,Domain,FluidEquilibrium,TensorProductGrid,DerhamOptions, andStruphyModelfromconfig.json. - Remove direct dependence on
struphy.geometry.domains/struphy.fields_background.equilsfor reconstructing domain/equilibrium in post-processing.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/struphy/simulation/sim.py |
Replace pickled config output with JSON config serialization to config.json. |
src/struphy/post_processing/post_processing_tools.py |
Replace “*.bin” config loading with config.json loading and object reconstruction via from_dict. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
max-models
marked this pull request as draft
August 3, 2026 09:08
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.
Solves the following issue(s):
Closes #293
Core changes:
Instead of exporting all the classes as pickled binary objects, export the main information about the simulation as a json file called
config.json