Skip to content

Commit 5643099

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

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/tests_pytorch/callbacks/test_weight_averaging.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
import pytest
1919
import torch
2020
from torch import Tensor, nn
21-
from torch.utils.data import DataLoader
2221
from torch.optim.swa_utils import get_swa_avg_fn
22+
from torch.utils.data import DataLoader
2323

2424
from lightning.pytorch import LightningModule, Trainer
2525
from lightning.pytorch.callbacks import WeightAveraging
@@ -170,9 +170,8 @@ def on_train_end(self, trainer: Trainer, pl_module: LightningModule) -> None:
170170

171171

172172
def test_weight_averaging_deepcopy(tmp_path):
173-
"""Ensure that WeightAveraging callback doesn't deepcopy the data loaders or the data module and consume memory more
174-
than necessary.
175-
"""
173+
"""Ensure that WeightAveraging callback doesn't deepcopy the data loaders or the data module and consume memory
174+
more than necessary."""
176175

177176
class TestCallback(WeightAveraging):
178177
def __init__(self, *args, **kwargs):

0 commit comments

Comments
 (0)