Repository navigation
perf: batch finite differences in monopolar log-penalty fits - #4871
Open
JESUSROYETH wants to merge 1 commit into
Open
JESUSROYETH wants to merge 1 commit into
JESUSROYETH wants to merge 1 commit into
Conversation
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.
Monopolar fits with
minimize_with_log_penalityrepeatedly call a small objective to estimate each gradient. The change batches the same four parameter points together in NumPy, so SciPy gets the objective and the gradient back in one call.The finite-difference step, the bound adjustment and the scalar evaluation budget stay the same. Fixed bounds, array subclasses, and waveforms with nonfinite values or a nonpositive maximum still use the existing SciPy call .. the change only targets the monopolar path used by the
dredgepreset.So, on the first five minutes of the public IBL
CSH_ZAD_026/2020-09-04/001, probe00 recording (384 channels), five paired CPU VM trials gave a 19.15% median reduction in complete-pipeline time (17.41–20.41%). Median times were 940.45 s for baseline and 755.98 s for this change.The timer covers the whole pipeline: local compressed
.cbinreading, filtering/phase shift/common reference, CPU DREDge correction, corrected-data saving, the defaulttridesclous2sorter, and a saved sparse analyzer with templates, amplitudes, locations, correlograms, five quality metrics and a saved unit selection. Also, both arms run on the same settings: 8-vCPU Inteln2-standard-8, four workers, one native thread, Python 3.12.3, NumPy 2.3.5, SciPy 1.18.1, and both explicitly usebatching_mode="full"for the current DREDge preset.Peak locations and motion agree byte for byte in each pair, and the full corrected-recording SHA-256 hashes agree too. The sorter varies between unchanged runs, so this is no claim about biological accuracy. Both localization test modules pass (13 tests), including a real-waveform regression for the numerical gradient and the evaluation budget, and the numerical checks also pass on ARM.