github plasma-umass/scalene v2.2.1
Scalene v2.2.1

9 hours ago

Scalene v2.2.1

Bug Fixes

  • sys.monitoring tool ID conflict with PyTorch (#1015, #1019): Fixed SIGSEGV crash when using Scalene with PyTorch Lightning on Python 3.12+. When PROFILER_ID is already claimed by another tool, Scalene now falls back to alternative tool IDs (3 or 4), or gracefully uses the legacy PyEval_SetTrace tracer.

  • TensorFlow 2.21+ compatibility (#1018): Fixed compatibility with TensorFlow 2.21+ where trace.enabled changed from a callable to a bool. Scalene now applies a compatibility fix at profiler start time.

  • Multiprocessing resource tracker (#1017): Fixed BrokenPipeError on NixOS with Python 3.13/3.14 when the resource tracker subprocess dies during semaphore creation. Scalene now falls back from spawn/forkserver to fork context.

  • Subprocess profiling (#1013): Fixed profiling failing when Python interpreter flags (like -B or -u) precede -c or -m in subprocess invocations.

  • Windows timer thread shutdown (#1012): Fixed fatal gilstate_tss_set error on Windows when the timer thread shuts down.

  • Windows --on/--off support (#1010): Added support for --on and --off flags on Windows using Named Events.

  • __future__ flags in exec/eval (#1008): Fixed __future__ compiler flags not being propagated in exec/eval/compile replacements.

  • Windows multiprocessing (#1005, #998): Fixed spawn-mode multiprocessing Pool support on Windows, including pickle corruption and memoryview cleanup issues.

New Features

  • Async-aware profiling (#1006): Added async-aware profiling support using sys.monitoring on Python 3.12+.

  • C23 allocator support (#1011): Added support for C23 free_sized and free_aligned_sized functions in SampleHeap.

Other Changes

  • Improved shell script portability for NixOS/Guix using #!/usr/bin/env bash
  • Code formatting updates via Black

Full Changelog: v2.1.4...v2.2.1

Don't miss a new scalene release

NewReleases is sending notifications on new releases.