Skip to content

Commit 3ad9577

Browse files
author
semantic-release
committed
chore(release): 1.0.2
1 parent cc23905 commit 3ad9577

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

CHANGELOG.md

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

33

4+
## v1.0.2 (2026-04-05)
5+
6+
### Bug Fixes
7+
8+
- **decoration**: Python 3.14 compat -- two-pass decoration + TypeError catch
9+
([#138](https://github.com/johnmarktaylor91/torchlens/pull/138),
10+
[`e6f0f9a`](https://github.com/johnmarktaylor91/torchlens/commit/e6f0f9a33ba31504d6e402c117aac4a87ef46cb5))
11+
12+
Python 3.14 (PEP 649) evaluates annotations lazily. During decorate_all_once(), wrapping Tensor.bool
13+
before inspecting Tensor.dim_order caused inspect.signature() to resolve `bool` in `bool |
14+
list[torch.memory_format]` to the wrapper function instead of the builtin type, raising TypeError
15+
on first call only.
16+
17+
Three fixes: - Catch TypeError alongside ValueError in get_func_argnames (safety net) - Split
18+
decorate_all_once() into two passes: collect argnames from pristine namespace first, then decorate
19+
(eliminates root cause) - Replace _orig_to_decorated idempotency guard with _is_decorated flag so
20+
partial decoration failure allows retry instead of locking in incomplete state
21+
22+
6 new tests, gotchas.md updated.
23+
24+
425
## v1.0.1 (2026-03-23)
526

627
### 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 = "1.0.1"
7+
version = "1.0.2"
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
@@ -7,7 +7,7 @@
77
``wrap_torch()``. The ``wrapped()`` context manager handles the full lifecycle.
88
"""
99

10-
__version__ = "1.0.1"
10+
__version__ = "1.0.2"
1111

1212
# ---- Public API: user-facing entry points --------------------------------
1313

0 commit comments

Comments
 (0)