Skip to content

v0.2.0

Choose a tag to compare

@zolizoli zolizoli released this 17 Mar 07:45
· 19 commits to main since this release

Build & Tooling

  • Migrated from Poetry to uv for package management
  • Converted pyproject.toml to PEP 621 standard
  • Updated all 5 GitHub Actions workflows to use uv
  • Added MANIFEST.in for proper sdist builds with Cython extensions

Performance & Memory

  • Replaced full dense SVD with truncated SVD (scipy.sparse.linalg.svds) operating directly on sparse PPMI matrices — eliminates ~800MB dense allocation for 10k vocabularies
  • Added O(1) dict-based vocabulary lookups in SVDAlgebra and ProcrustesAligner, replacing O(n) list scans
  • Vectorized CountMinSketch update/query using numpy fancy indexing
  • Added track_keys parameter to CountMinSketch to skip observed-key tracking when not needed (saves millions of string entries during skipgram counting)
  • Pre-computed unified vocabulary mappings in TopicModel.align_with() before O(n_topics²) loop
  • Replaced print statements with proper logging

Tests

  • Expanded test suite from 27 to 41 tests while reducing runtime from 12.4s to 2.4s
  • Added coverage for distance(), analogy(), get_word_similarity(), single-topic models, edge cases
  • Consolidated duplicate CMS tests, removed debug print statements
  • Created shared conftest.py with reusable fixtures
  • Fixed typo: renamed ProcustesAligner → ProcrustesAligner (breaking change)

Breaking Changes

  • ProcustesAligner renamed to ProcrustesAligner
  • CountMinSketch.get_heavy_hitters() raises RuntimeError if `track_keys=False