Skip to content

Commit 158b95a

Browse files
committed
comments
1 parent b8d8392 commit 158b95a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/zero_code_change/test_pytorch_multiprocessing.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,14 @@ def forward(self, x):
4141

4242
def train(rank, model, device, dataloader_kwargs):
4343
# Training Settings
44-
shutil.rmtree(data_dir, ignore_errors=True)
44+
4545
batch_size = 64
4646
epochs = 1
4747
lr = 0.01
4848
momentum = 0.5
49+
50+
# clear data_dir before saving to it
51+
shutil.rmtree(data_dir, ignore_errors=True)
4952
torch.manual_seed(1 + rank)
5053
train_loader = torch.utils.data.DataLoader(
5154
datasets.MNIST(

0 commit comments

Comments
 (0)