Skip to content

v1.0.2

Latest

Choose a tag to compare

@torchlens-release torchlens-release released this 05 Apr 16:15
· 3 commits to main since this release

v1.0.2 (2026-04-05)

This release is published under the GPL-3.0-only License.

Bug Fixes

  • decoration: Python 3.14 compat -- two-pass decoration + TypeError catch (#138, e6f0f9a)

Python 3.14 (PEP 649) evaluates annotations lazily. During decorate_all_once(), wrapping Tensor.bool before inspecting Tensor.dim_order caused inspect.signature() to resolve bool in bool | list[torch.memory_format] to the wrapper function instead of the builtin type, raising TypeError on first call only.

Three fixes:

  • Catch TypeError alongside ValueError in get_func_argnames (safety net)
  • Split decorate_all_once() into two passes: collect argnames from
    pristine namespace first, then decorate (eliminates root cause)
  • Replace _orig_to_decorated idempotency guard with _is_decorated flag
    so partial decoration failure allows retry instead of locking in
    incomplete state

6 new tests, gotchas.md updated.


Detailed Changes: v1.0.1...v1.0.2