RepoJournal
PyTorch

@pytorch

PyTorch and the broader machine-learning ecosystem

Keep up with PyTorch in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

One email a day. Unsubscribe in one click.

Pick a date

Topics: Python AI / ML Full archive →

The Wire · Showcase

TORCHRL CHECKPOINTS NOW MEMORY-MAPPED BY DEFAULT, FIXING WINDOWS FILE-LOCK CORRUPTION

By RepoJournal · Filed · About PyTorch

TorchRL's trainer checkpoint loader was materializing entire files into non-evictable RAM and aliasing external state into live components, causing permission errors on Windows and potential corruption if checkpoints were rewritten externally.

The fix lands in two coordinated PRs: Trainer.load_from_file now defaults to torch.load(mmap=True) [1], slashing checkpoint load memory footprint, while all load_state_dict implementations now copy tensors instead of aliasing them [2], breaking the pin on checkpoint file mappings that was blocking file overwrites. The mmap change alone cuts resident memory during restore, critical for large checkpoints that previously had to materialize fully before distribution to components. Meanwhile, doc build times got slashed from 78 to under 40 minutes by introducing MujocoEnv.render_every to skip rendering on frames the VideoRecorder drops anyway [3]. Device precedence rules that were duplicated across four different collector and inference server implementations got unified into a single shared resolution function [4], eliminating the manual replication burden on future changes. ExecuTorch shipped nested superscale quantization for CUDA weights, bringing int4 and int6 down to fp16 metadata packed in 256-weight superblocks [5], and added genuine INT5 support with the same quantization scheme [6]. WebGPU shader codegen now generates vec1/vec4 variants and is fp16-ready [7], while PruneEmptyTensorsPass was hardened against data-dependent shapes that were crashing export [8].

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] [Performance] Memory-map trainer checkpoints on load ↗ pytorch/rl
  2. [2] [BugFix] Copy tensors in load_state_dict instead of aliasing the source ↗ pytorch/rl
  3. [3] [Doc] Cut doc-build time: MujocoEnv render_every, tutorial CI fast path, per-example time budget ↗ pytorch/rl
  4. [4] [Refactor] Share device-precedence resolution across collectors and inference servers ↗ pytorch/rl
  5. [5] [cuda] Nestest Superscale Quantization for CUDA Weights (int4 / int6) (#20571) pytorch/executorch
  6. [6] [cuda backend] int5 quantization support ↗ pytorch/executorch
  7. [7] [ExecuTorch][WebGPU] WGSL shader-variant codegen (vec1/vec4, fp16-ready) + rms_norm dedup ↗ pytorch/executorch
  8. [8] Fix PruneEmptyTensorsPass crash on data-dependent shapes (#20809) pytorch/executorch

Quick answers

What shipped in PyTorch on July 10, 2026?
TorchRL's trainer checkpoint loader was materializing entire files into non-evictable RAM and aliasing external state into live components, causing permission errors on Windows and potential corruption if checkpoints were rewritten externally. In total, 80 commits and 24 pull requests landed.
Who contributed to PyTorch on July 10, 2026?
4 developers shipped this update, including theap06, vmoens, Gasoonjia, and pytorchbot.
What were the notable PyTorch updates?
[Performance] Memory-map trainer checkpoints on load, [BugFix] Copy tensors in load_state_dict instead of aliasing the source, and [Doc] Cut doc-build time: MujocoEnv render_every, tutorial CI fast path, per-example time budget.

More from @pytorch

Daily updates, in your inbox

Follow PyTorch

Keep up with PyTorch in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?

We use privacy-friendly analytics (Google Analytics, IP-anonymized) to see which pages help readers. No ads, and we never sell your data. See our Privacy Policy.