GEOPY-3035: Striping of data with no values running MVI with disk storage - #169
Open
domfournier wants to merge 1 commit into
Open
GEOPY-3035: Striping of data with no values running MVI with disk storage#169domfournier wants to merge 1 commit into
domfournier wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Dask-based potential-fields sensitivity (J) assembly to better support disk-backed storage workflows (per GEOPY-3035), shifting away from manual Zarr writes toward Dask Array concatenation and to_zarr.
Changes:
- Simplifies
block_computeto return stacked NumPy blocks (removing the prior on-disk write helper). - Adds distributed-client handling during
linear_operatorassembly. - Writes disk-backed sensitivities via
dask.array.to_zarr(...)instead of direct Zarr selection writes.
Suppressed comments (2)
simpeg/dask/potential_fields/base.py:82
- For disk-backed sensitivities,
rowsneeds to be a list of Dask arrays (built viafrom_delayed) so it can be concatenated and written with.to_zarr(). Keeping the Future-basedclient.submitpath for disk mode makesrowsincompatible withdask.array.concatenate.
if client and worker:
simpeg/dask/potential_fields/base.py:109
- When
store_sensitivities == "disk",rowsshould be Dask arrays (fromfrom_delayed), not distributed Futures, so thisclient.gather(rows)branch should be disabled in disk mode to keep the later.to_zarr()path consistent.
if client and worker:
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+71
to
+72
| if client is None: | ||
| client = Client() |
| count = 0 | ||
| for block in block_split: | ||
| if client: | ||
| for count, block in enumerate(block_split): |
Comment on lines
+120
to
+124
| with ProgressBar(): | ||
| j_matrix = j_matrix.to_zarr( | ||
| self.sensitivity_path, return_stored=True, compute=True | ||
| ) | ||
| return j_matrix |
| if client is None: | ||
| client = Client() | ||
|
|
||
| if client and worker: |
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-3035 - Striping of data with no values running MVI with disk storage