$ cat pytorch/week/2026-10-19.log
the week in review · Oct 19 – Oct 25, 2026
TensorDict stops silently dropping data on nested and lazy-stack paths
By RepoJournal · composed from the cited sources · human-reviewed weekly · methodology
Six tensordict fixes close silent data loss in create_nested, sub-tensordict in-place ops and nested lazy stacks, alongside four new deprecation warnings.
[BugFix] create_nested with a nested key keeps the entries already under its parent keys pytorch/tensordict
Calling create_nested(("a", "b")) replaced td["a"] with an empty tensordict and discarded everything already stored there, without a warning. TorchRL's RemoveEmptySpecs hits this for each empty composite spec, so envs with empty composites lost entries during spec cleanup; the existing entries now survive.
[BugFix] In-place pointwise ops on a sub-tensordict write into a nested lazy stack pytorch/tensordict
In-place pointwise ops on a sub-tensordict held a lazy stack in the source, changed a copy and dropped it, while zero_ and the rest appeared to work. If you write into part of a tensordict in place over heterogeneous or lazy_stack data, check your upgrade: add_, mul_, clamp_min_, lerp_ and += now write into the nested lazy stack.
[BugFix] Pointwise ops with a batch-shaped tensor give the right values for a nested lazy stack pytorch/tensordict
A batch-shaped tensor, such as a per-sample weight, is meant to line up with the batch dims of every leaf, but add, mul, maximum and the other pointwise ops gave wrong values when the tensordict held a lazy stack below its root. Fixed, which matters for the heterogeneous and lazy_stack observation layouts RL code tends to build.
[BugFix] clamp writes into out, and the in-place and two-operand pointwise ops broadcast a batch-shaped tensor pytorch/tensordict
Three calls that raised despite their documentation: td.clamp(..., out=out) failed for every input, and maximum_, minimum_, clamp_min_ and clamp_max_ rejected a batch-shaped tensor that the non-in-place versions accept. Both paths now behave as documented.
[tokenizer] Preserve non-special added tokens (#5470) pytorch/torchtitan
The tokenizer marked ordinary added tokens as special, so default decoding dropped them, including Qwen3's reasoning and tool-call delimiters. The release notes say `_infer_special_tokens` reads `special=False` from `added_tokens_decoder`, then passes every token to `add_special_tokens`.
[Deprecation] Warn when update(update_batch_size=True) keeps a shorter batch size pytorch/tensordict
td.update(source, update_batch_size=True) is documented to adopt the source's batch size, but when td's batch size is a prefix of the source's ([] against [2]) it keeps its own, silently. It still keeps it, but now warns before that becomes an error.
[MPS] Restrict threshold, silu, huber_loss and lerp to the dtypes CPU/CUDA support (#201260) pytorch/pytorch
MPS accepted dtypes for threshold, silu, huber_loss and lerp that neither CPU nor CUDA implements, such as bool for threshold and integer dtypes for silu and huber_loss. Those combinations now raise the same errors as elsewhere, so MPS code relying on the looser behavior will break.
[Deprecation] Let int, float and bool tensorclass fields take a number with any batch size pytorch/tensordict
Alongside: tensorclasses gained warnings for int, float and bool fields receiving a number with any batch size, acceptance of InitVar, field(repr=False) and kw_only=True as in dataclasses, while torch.sort and topk now handle dimensions longer than INT_MAX.
$ ls pytorch/week/ # the briefings behind this review
Keep up with PyTorch in about 3 minutes: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
fair warning: these emails are deeply technical. diffs, version numbers, CVEs, benchmark deltas. if that's not your idea of a good read, this isn't your newsletter.
Folds into your digest — weekly by default, monthly if you prefer. Unsubscribe in one click.