Skip to content

Commit 2c15b6b

Browse files
author
semantic-release
committed
chore(release): 0.20.3
1 parent bc2c3df commit 2c15b6b

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
11
# CHANGELOG
22

33

4+
## v0.20.3 (2026-03-08)
5+
6+
### Bug Fixes
7+
8+
- **vis**: Increase ELK Node.js stack floor to 4GB for large graphs
9+
([`29af94e`](https://github.com/johnmarktaylor91/torchlens/commit/29af94ed51b9018ba214f2de15c48e5454a773b3))
10+
11+
128MB was insufficient for ELK's recursive layout on 500k+ node graphs.
12+
13+
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
14+
15+
- **vis**: Raise OS stack limit for ELK Node.js subprocess
16+
([`da82c9d`](https://github.com/johnmarktaylor91/torchlens/commit/da82c9d0fd66c2fdcbaabb86b31750811693a930))
17+
18+
The OS soft stack limit (ulimit -s) was smaller than the --stack-size value passed to Node.js,
19+
causing a segfault on large graphs (500k+ nodes) instead of allowing V8 to use the requested
20+
stack. Uses preexec_fn to set RLIMIT_STACK to unlimited in the child process only.
21+
22+
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23+
24+
### Performance Improvements
25+
26+
- **decoration**: Optimize model prep and move session attrs to ModelLog dicts
27+
([`b63a4fa`](https://github.com/johnmarktaylor91/torchlens/commit/b63a4fa3871113a5cc73554c576fb11c5eac2cd2))
28+
29+
Five performance fixes for _prepare_model_session and related setup code:
30+
31+
- PERF-38: Replace O(N²) list concat in _traverse_model_modules with deque - PERF-37: Cache
32+
user_methods per class in _get_class_metadata; move _pytorch_internal set to module-level
33+
frozenset - PERF-36: Iterate module._parameters directly instead of rsplit on named_parameters
34+
addresses + lookup dict - PERF-39: Skip patch_model_instance for already-prepared models - Move 4
35+
session-scoped module attrs (tl_module_pass_num, tl_module_pass_labels, tl_tensors_entered_labels,
36+
tl_tensors_exited_labels) from nn.Module instances to ModelLog dicts keyed by id(module). Remove
37+
tl_source_model_log (dead code). Eliminates per-module cleanup iteration in
38+
_cleanup_model_session.
39+
40+
At 10K modules: ensure_prepared repeat calls drop from ~48ms to ~0.4ms (111x), session setup ~1.3x
41+
faster, cleanup ~1.4x faster.
42+
43+
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44+
45+
446
## v0.20.2 (2026-03-08)
547

648
### Bug Fixes

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "torchlens"
7-
version = "0.20.2"
7+
version = "0.20.3"
88
description = "A package for extracting activations from PyTorch models"
99
readme = "README.md"
1010
license = "GPL-3.0-only"

torchlens/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
first imported. See the bottom of this file for details.
1010
"""
1111

12-
__version__ = "0.20.2"
12+
__version__ = "0.20.3"
1313

1414
# ---- Public API: user-facing entry points --------------------------------
1515

0 commit comments

Comments
 (0)