GEOPY-2884: Change data groups saved for MVI as requested by users#146
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new GeoH5-saving directive intended to change how inversion model outputs are grouped (for user-requested MVI workflows), and includes a small readability-only formatting change in the vector-model directive.
Changes:
- Reformats the MVI switching conditional in
VectorInversion.endIterfor readability (no logic change). - Adds a new
SaveModelGroupdirective that groups saved FloatData into property groups keyed by component name. - Exposes
SaveModelGroupfromsimpeg.directivesvia__init__.py.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
simpeg/directives/_vector_models.py |
Minor formatting/readability update to the MVI coordinate-switching condition. |
simpeg/directives/_save_geoh5.py |
Adds SaveModelGroup directive to control property-group naming/grouping. |
simpeg/directives/__init__.py |
Re-exports SaveModelGroup from the directives package. |
Comments suppressed due to low confidence (1)
simpeg/directives/init.py:133
- PR description indicates behavior change for “data groups saved for MVI”, but within this repo the new
SaveModelGroupis only defined/exported and not referenced anywhere else. As-is, no grouping behavior will change unless downstream code/workflows switch to this directive. Either update the PR description to reflect that this is a new optional directive, or include the change that wires it into the MVI saving pipeline (if intended).
from ._save_geoh5 import (
BaseSaveGeoH5,
SaveDataGeoH5,
SaveLogFilesGeoH5,
SaveLPModelGroup,
SaveModelGroup,
SaveModelGeoH5,
SavePGIModel,
SavePropertyGroup,
SaveSensitivityGeoH5,
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+528
to
+536
| def get_names( | ||
| self, component: str, channel: int | None, iteration: int | ||
| ) -> tuple[str, str]: | ||
| """ | ||
| Format the data and property_group name. | ||
| """ | ||
| channel_name, _ = super().get_names(component, channel, iteration) | ||
|
|
||
| return channel_name, component |
benk-mira
approved these changes
May 28, 2026
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.
GEOPY-2884 - Change data groups saved for MVI as requested by users