Skip to content

GEOPY-3035: Striping of data with no values running MVI with disk storage - #169

Open
domfournier wants to merge 1 commit into
developfrom
GEOPY-3035
Open

GEOPY-3035: Striping of data with no values running MVI with disk storage#169
domfournier wants to merge 1 commit into
developfrom
GEOPY-3035

Conversation

@domfournier

@domfournier domfournier commented Aug 17, 2026

Copy link
Copy Markdown

GEOPY-3035 - Striping of data with no values running MVI with disk storage

Copilot AI lite review requested due to automatic review settings August 17, 2026 20:47
@github-actions github-actions Bot changed the title GEOPY-3035 GEOPY-3035: Striping of data with no values running MVI with disk storage Aug 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_compute to return stacked NumPy blocks (removing the prior on-disk write helper).
  • Adds distributed-client handling during linear_operator assembly.
  • 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, rows needs to be a list of Dask arrays (built via from_delayed) so it can be concatenated and written with .to_zarr(). Keeping the Future-based client.submit path for disk mode makes rows incompatible with dask.array.concatenate.
        if client and worker:

simpeg/dask/potential_fields/base.py:109

  • When store_sensitivities == "disk", rows should be Dask arrays (from from_delayed), not distributed Futures, so this client.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:
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.

2 participants