Skip to content

v0.1.1 - review cleanups

Choose a tag to compare

@jmxpearson jmxpearson released this 11 Sep 15:07
· 47 commits to main since this release

Quality pass over the whole package. No behaviour change — verified by the figure rendering byte-identical to v0.1.0 (sha256 9ec64bb3…) and sven-evaluate returning bit-identical metrics (K1 7.83237886428833, K4 2.0749239803578408).

API changes

Three public symbols removed, all dead in this package and in finchsim:
of_encode (superseded by coch_encode), build_sl_filterbank and build_sl_spike_group (no callers, and the only pieces here that could not compile to Brian2 standalone).

sven-figure --encoder lewicki is gone. It read outputs/lewicki_motif_filters.npz, which nothing in this package produces — that training code stayed in finchsim — so the option was unusable from a clean clone. The Smith-Lewicki classes remain exported and supported, since finchsim's circuit path uses them; passing one to the figure now raises a clear TypeError.

New

  • constants.py — SR, KERNEL_WIDTH_MS, PEAK_RATE_HZ, DAF_WN_AMPLITUDE, DAF_WINDOW_S, and the two conduction delays. PEAK_RATE was derived in one file and hardcoded as 300.0 in three figure signatures, so changing the kernel width would silently have left the figures behind.
  • corpus.py — Corpus and highest_rms_index(). The template rule ('the loudest rendition is the template') was re-derived in four places; if they had diverged, the figure and the metrics would have described a different motif than training used.
  • n_channels on both encoder classes, replacing a hasattr(enc, 'n_bases') else 64 fallback that would have mis-sized arrays for any dictionary not 64 wide.

Also removed a vestigial np.random.seed() before inference — a leftover from before the network owned a seeded generator. The byte-identical render is the proof it no longer did anything.

Tests

25 fast (was 18) + 7 reproduction assertions, lint clean, make verify clean.