Repository navigation
Speed up sorted-scale runs: 306 units 3258 s → 463 s (1.15.0) - #170
Merged
Merged
Conversation
…op, threaded exact null models (1.15.0) On the 306-unit spike-sorted recording, steps 1-4 drop from 3258 s to 463 s. - STTC: numba prange across rows (paired from both ends), ~10x per matrix; serial fallback if the threading layer is missing (frozen app). - NMF: fits run on threads with seeds drawn in the original order and BLAS pinned to 1 thread, so results don't depend on thread count; the rank sweep stops at the 95% crossing or when the curve levels off (new nmf_plateau_gain, default 0.005; 0 = MATLAB's full sweep), with a GUI widget on the Connectivity tab. - participation_coef_norm: null-model random draws are planned up front in order, then rewiring runs on threads with identical results. - randmio/latmio v2 and randmio_und_signed compiled with numba, same RNG stream as before. - Equivalence tests against the replaced code in test_pipeline_fast_paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBjNAqNrYVFQSwnaKgi25j
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.
Prepares the Python pipeline for spike-sorted data with hundreds of units. On the 306-unit sorted recording (steps 1–4, full figures, one recording):
Adjacency matrices and the network CSVs are identical to the old run.
Changes
sttc.py): numbaprangeacross rows, paired from both ends to balance load: 2.2 s → 0.22 s per matrix. If numba's threading layer is missing (e.g. a frozen app), it warns and runs serially with the same results. The build spec now collectsnumba.np.ufunc, andapp_smokechecks it.nmf.py): 933 s → 26 s.nmf_plateau_gain(default 0.005; 0 = MATLAB's full sweep). Skipped ranks are NaN.null_models.py,network_metrics.py): 379 s → 33 s. All random draws for the 100 null models depend only on the original edge counts, so they are planned up front in order and the rewiring then runs on threads with identical results.Caveats
plot_networktakes about 190 s.test_gui_advanced.Tests
test_pipeline_fast_paths: 91/91. It compares each rewritten piece against the replaced code (including RNG state) at 1 and many threads.test_step4_optional_metrics21/21; CAT-NAP 112/112; catnap_subnetwork 45/45; sorted_import, null_models, nmf and small_worldness pass.test_pipeline_streaming_pool,test_viewer_serverandtest_stats_report, which also fail on main.🤖 Generated with Claude Code
https://claude.ai/code/session_01LBjNAqNrYVFQSwnaKgi25j