We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3b3a78 commit 8baf30eCopy full SHA for 8baf30e
examples/pytorch/bug_report/bug_report_model.py
@@ -1,10 +1,8 @@
1
-import os
2
3
import torch
4
-from lightning.pytorch import LightningModule, Trainer
5
-from torch.utils.data import DataLoader, Dataset
6
-
+from lightning.pytorch import LightningModule
7
from pytorch.cli import LightningCLI
+from torch.utils.data import DataLoader, Dataset
8
9
10
class RandomDataset(Dataset):
@@ -49,6 +47,7 @@ def run():
49
47
val_data = DataLoader(RandomDataset(32, 64), batch_size=2)
50
48
51
import os
+
52
os.environ["PL_TRAINER_ACCELERATOR"] = "cpu"
53
os.environ["PL_TRAINER_DEVICES"] = "2"
54
0 commit comments