GEOPY-2910: Reduce chunking of sensitivities for TEM inversions#150
Open
domfournier wants to merge 1 commit into
Open
GEOPY-2910: Reduce chunking of sensitivities for TEM inversions#150domfournier 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 targets GEOPY-2910 by adjusting how TEM sensitivity computations are chunked/assembled in the Dask TDEM simulation path, aiming to reduce excessive chunking overhead during inversions.
Changes:
- Disables
get_parallel_blocks(..., optimize=False)to avoid extra re-splitting of blocks. - Refactors
get_field_deriv_blockto assemble a single per-block matrix of back-solved field derivatives rather than a list of per-chunk arrays. - Updates
compute_rowsto slice the new per-block field-derivative matrix using a running column offset (colm_count).
Comments suppressed due to low confidence (1)
simpeg/dask/electromagnetics/time_domain/simulation.py:480
- When
local_indis empty youcontinuewithout advancingcolm_count, so subsequent receiver chunks will slice the wrong columns out offield_derivs[block_ind].colm_countneeds to be incremented even when a chunk has no active (time-masked) entries.
if len(local_ind) < 1:
row_block = np.zeros(
(len(ind_array[1]), simulation.model.size), dtype=np.float32
)
rows.append(row_block)
continue
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
benk-mira
approved these changes
Jun 16, 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-2910 - Reduce chunking of sensitivities for TEM inversions