Skip to content

Commit 6f3f8e9

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ffbd4c1 commit 6f3f8e9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/tests_fabric/strategies/test_fsdp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,8 +645,8 @@ def fake_load(path, weights_only=None):
645645

646646

647647
def test_load_sharded_checkpoint_metadata_weights_only(monkeypatch):
648-
"""The sharded-checkpoint metadata load must default to `weights_only=False` (like the full-checkpoint path)
649-
so non-tensor metadata loads on torch>=2.6, while still honoring an explicit user value."""
648+
"""The sharded-checkpoint metadata load must default to `weights_only=False` (like the full-checkpoint path) so
649+
non-tensor metadata loads on torch>=2.6, while still honoring an explicit user value."""
650650
strategy = FSDPStrategy()
651651
monkeypatch.setattr(strategy, "broadcast", lambda x: x)
652652
monkeypatch.setattr("lightning.fabric.strategies.fsdp._has_fsdp_modules", lambda m: True)

tests/tests_pytorch/strategies/test_fsdp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,8 +959,8 @@ def test_load_full_checkpoint_remote_allows_non_tensor_objects(load_mock, __, __
959959
@mock.patch("lightning.pytorch.strategies.fsdp._is_sharded_checkpoint", return_value=True)
960960
@mock.patch("lightning.pytorch.strategies.fsdp._load")
961961
def test_load_sharded_checkpoint_metadata_weights_only(load_mock, _is_sharded_mock, _ctx_mock, _dist_load_mock):
962-
"""The sharded-checkpoint metadata load must default to `weights_only=False` (like the full-checkpoint path)
963-
so non-tensor metadata loads on torch>=2.6, while still honoring an explicit user value."""
962+
"""The sharded-checkpoint metadata load must default to `weights_only=False` (like the full-checkpoint path) so
963+
non-tensor metadata loads on torch>=2.6, while still honoring an explicit user value."""
964964
load_mock.return_value = {}
965965

966966
model = BoringModel()

0 commit comments

Comments
 (0)