Skip to content

Commit a9dc306

Browse files
committed
formatting
1 parent 1069a9f commit a9dc306

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

pl_examples/basic_examples/dali_image_classifier.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,23 +197,23 @@ def train_dataloader(self):
197197
self.pipe_train,
198198
size=len(self.mnist_train),
199199
auto_reset=True,
200-
fill_last_batch=True
200+
fill_last_batch=True,
201201
)
202202

203203
def val_dataloader(self):
204204
return DALIClassificationLoader(
205205
self.pipe_val,
206206
size=len(self.mnist_val),
207207
auto_reset=True,
208-
fill_last_batch=False
208+
fill_last_batch=False,
209209
)
210210

211211
def test_dataloader(self):
212212
return DALIClassificationLoader(
213213
self.pipe_test,
214214
size=len(self.mnist_test),
215215
auto_reset=True,
216-
fill_last_batch=False
216+
fill_last_batch=False,
217217
)
218218

219219

pl_examples/basic_examples/profiler_example.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@
4444

4545
class ModelToProfile(LightningModule):
4646

47-
def __init__(
48-
self,
49-
name: str = "resnet50"
50-
):
47+
def __init__(self, name: str = "resnet50"):
5148
super().__init__()
5249
self.model = getattr(models, name)(pretrained=True)
5350
self.criterion = torch.nn.CrossEntropyLoss()

pl_examples/bug_report_model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
2+
23
import torch
3-
from torch.utils.data import Dataset, DataLoader
4+
from torch.utils.data import DataLoader, Dataset
5+
46
from pytorch_lightning import LightningModule, Trainer
57

68

pytorch_lightning/accelerators/cpu.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ def setup(self, trainer: 'pl.Trainer', model: 'pl.LightningModule') -> None:
3434
)
3535

3636
if "cpu" not in str(self.root_device):
37-
raise MisconfigurationException(
38-
f"Device should be CPU, got {self.root_device} instead."
39-
)
37+
raise MisconfigurationException(f"Device should be CPU, got {self.root_device} instead.")
4038

4139
return super().setup(trainer, model)

pytorch_lightning/utilities/device_dtype_mixin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
from typing import Optional, Union
16+
1617
import torch
1718
from torch.nn import Module
1819

0 commit comments

Comments
 (0)