Skip to content

Commit 4696f66

Browse files
Disable multiprocessing dataloader in tensorboard tutorial and ignore tensorboard deprecation warning (#3550)
## Description This PR disables the multiprocessing dataloader in the tensorboard tutorial because enabling the multiprocessing dataloader (num_workers=2) caused a runtime error when running the tutorial code on mac. This PR also ignores a deprecation warning from tensorboard as tensorboard isn't actively fixing it (tensorflow/tensorboard#7003). ## Checklist <!--- Make sure to add `x` to all items in the following checklist: --> - [ ] The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER") - [ ] Only one issue is addressed in this pull request - [ ] Labels from the issue that this PR is fixing are added to this pull request - [ ] No unnecessary issues are included into this pull request. --------- Co-authored-by: sekyondaMeta <127536312+sekyondaMeta@users.noreply.github.com>
1 parent 593759e commit 4696f66

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

intermediate_source/tensorboard_tutorial.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,9 @@ We'll begin with similar boilerplate code as in the `CIFAR-10 tutorial <https://
6060
transform=transform)
6161
6262
# dataloaders
63-
trainloader = torch.utils.data.DataLoader(trainset, batch_size=4,
64-
shuffle=True, num_workers=2)
63+
trainloader = torch.utils.data.DataLoader(trainset, batch_size=4, shuffle=True)
6564
66-
67-
testloader = torch.utils.data.DataLoader(testset, batch_size=4,
68-
shuffle=False, num_workers=2)
65+
testloader = torch.utils.data.DataLoader(testset, batch_size=4, shuffle=False)
6966
7067
# constant for classes
7168
classes = ('T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
@@ -159,7 +156,7 @@ Now running
159156

160157
::
161158

162-
tensorboard --logdir=runs
159+
PYTHONWARNINGS="ignore:pkg_resources is deprecated as an API:UserWarning" tensorboard --logdir=runs
163160

164161
from the command line and then navigating to `http://localhost:6006 <http://localhost:6006>`_
165162
should show the following.

0 commit comments

Comments
 (0)