github plasma-umass/scalene v2.4.0
Free-threaded wheels, M4 fix, safer API keys, and formal verification

3 hours ago

What's Changed

Headlines

  • Free-threaded Python wheels on PyPI: cp313t and cp314t wheels for macOS and Windows, and cp314t for Linux. Release builds now check that every wheel's native modules import, and that on free-threaded builds they don't re-enable the GIL.
  • Apple Silicon M4+ fix: on chips with SME, profiling numpy/Accelerate code could silently corrupt numerical results (#1056). CPU sampling on those chips no longer uses signals.
  • Safer AI-provider keys: API keys are never embedded in generated HTML. The new opt-in scalene view --api-keys-from-env serves them from memory over localhost instead. The GUI is now served from a private directory rather than the whole temp dir.
  • Correctness: fixes found by new formal models (TLA+ and Lean) of Scalene's sampling and attribution, including several divide-by-zero and unbounded-sampling bugs.

New feature work

Bug fixes

Formal verification

  • Add formal models (TLA+ and Lean) of Scalene's concurrency and correctness, and prove the profiler-correctness desideratum (unbiased, consistent attribution), the Poisson sampler, memory-sampler correctness and the Python/native classifier, in #1068, #1070, #1072, #1075, #1076, #1080, #1082, #1083 and #1084

Testing and CI

  • CI fails when native modules don't import or tests don't collect by @emeryberger in #1105
  • Free-threaded CI jobs run their tests again (#1089, #1103), and a test-suite sys.executable leak no longer skips the free-threaded memory tests (#1066)
  • Deflaking: #1069, #1071, #1074, #1096

Note for free-threaded Python 3.13 users

pydantic-core no longer ships cp313t wheels and its newest releases can't be built from source there. Until that changes, install with:

pip install scalene "pydantic-core<=2.46.5"

New Contributors

Full Changelog: v2.3.0...v2.4.0

Don't miss a new scalene release

NewReleases is sending notifications on new releases.