pytorch-lightning
56d15a49 - Remove dead PyTorch < 2.6 version guards (#21870)

Commit
80 days ago
Remove dead PyTorch < 2.6 version guards (#21870) * Remove dead PyTorch < 2.6 version guards The torch floor was raised to 2.6 in #21851, so the _TORCH_GREATER_EQUAL_2_2 .. _TORCH_GREATER_EQUAL_2_5 guards (plus the unused _TORCH_EQUAL_2_4_0 / _TORCH_GREATER_EQUAL_2_4_1 constants) are always true and their else-branches unreachable. Drop the constants, inline the surviving branches, and remove the tests that only covered the now-impossible paths. * Add CHANGELOG entries for the removed torch version guards * Fix tests referencing symbols dropped from the strategy modules - import the DCP reader/writer helpers from lightning.fabric.utilities.cloud_io, where they are defined, instead of the FSDP re-export - stop patching model_parallel._lazy_load, which the module no longer uses; the remote-vs-mmap regression test now watches torch.load instead * Address review: drop kwargs indirection and stale comment The `kwargs` dict in the six `_setup_distributed` implementations only existed to build the argument list conditionally. Now that both entries are unconditional, pass them directly as keyword arguments. Also drop the `_lazy_load` mention from the model_parallel comment; that path uses `torch.load(mmap=True)` only.
Author
Parents
Loading