$ the-wire · showcase
TensorDict fixes h5 and zarr persistence; FBGEMM drops float-only dispatch
By RepoJournal · Filed · About PyTorch · Composed from the cited sources · methodology
TensorDict's persistence layer absorbed the day's real work: tuple-key indexing, cloning, and an h5 format change that will alter what from_h5 returns in 0.17, while the rest of the stack shipped CI and dispatch cleanups.
[Deprecation] h5 files store the batch sizes and dim names, and from_h5 warns before it restores them in 0.17 pytorch/tensordict
h5 files now store batch sizes and dim names the way zarr already did, because from_h5 previously inferred every batch size from entry shapes, so a nested tensordict of batch size [3] came back as [3, 1, 2]. from_h5 warns where it will return something else in 0.17, so code that round-trips through to_h5 should expect a different tensordict back after the release.
[BugFix] h5 and zarr tuple keys give a nested group the batch size and names that chained indexing gives pytorch/tensordict
On a PersistentTensorDict, td["n", "m"] and td["n"]["m"] returned different sub-tensordicts: the tuple spelling gave the nested group the root's batch size on h5 and no names on zarr, and some row writes raised. Both spellings now return the same object.
[BugFix] clone(newfile=) copies empty nested tensordicts, and zarr clones store each group's own batch size pytorch/tensordict
clone(newfile=) raised a KeyError on both backends when the file held an empty nested tensordict, and on zarr it stored a nested group with its parent's batch size if you had read that key first, so from_zarr came back with the wrong batch size. Both clones now work and store each group's own batch size.
[BugFix] In-place reshape and repeat_interleave on a legacy lazy view raise NotImplementedError instead of corrupting the view's source pytorch/tensordict
With set_lazy_legacy(True), reshape(..., inplace=True) and repeat_interleave(..., inplace=True) on a lazy view like src.permute(1, 0) reported success while writing reshaped leaves into the view's source, leaving the source inconsistent with its own leaves until a later to_tensordict() failed. Both now raise NotImplementedError, matching flatten, unflatten, repeat and gather.
[Versioning] Keep torchrl.envs.llm and GAILLoss working with tensordict 0.17 (#4638) pytorch/rl
tensordict 0.17 removes is_seq_of_nested_key, TensorDictModule.device and set_capture_non_tensor_stack(True), all of which TorchRL still uses, so lifting the pin as written would break import torchrl.envs.llm and GAILLoss.forward; this PR is the compatibility work that has to land first. Elsewhere, FBGEMM swapped bucketize's float-only macros for explicit FP32 checks and fixed an unaligned Vec4...
Action items