Skip to content

Commit 4cd44ae

Browse files
Change formatting of code blocks for correct rendering in Colab (#2398)
1 parent d9fd5ba commit 4cd44ae

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: intermediate_source/tensorboard_profiler_tutorial.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
-----
1919
To install ``torch`` and ``torchvision`` use the following command:
2020
21-
::
21+
.. code-block::
2222
2323
pip install torch torchvision
2424
@@ -160,23 +160,23 @@ def train(data):
160160
#
161161
# Install PyTorch Profiler TensorBoard Plugin.
162162
#
163-
# ::
163+
# .. code-block::
164164
#
165165
# pip install torch_tb_profiler
166166
#
167167

168168
######################################################################
169169
# Launch the TensorBoard.
170170
#
171-
# ::
171+
# .. code-block::
172172
#
173173
# tensorboard --logdir=./log
174174
#
175175

176176
######################################################################
177177
# Open the TensorBoard profile URL in Google Chrome browser or Microsoft Edge browser.
178178
#
179-
# ::
179+
# .. code-block::
180180
#
181181
# http://localhost:6006/#pytorch_profiler
182182
#
@@ -287,7 +287,7 @@ def train(data):
287287
# In this example, we follow the "Performance Recommendation" and set ``num_workers`` as below,
288288
# pass a different name such as ``./log/resnet18_4workers`` to ``tensorboard_trace_handler``, and run it again.
289289
#
290-
# ::
290+
# .. code-block::
291291
#
292292
# train_loader = torch.utils.data.DataLoader(train_set, batch_size=32, shuffle=True, num_workers=4)
293293
#
@@ -316,7 +316,7 @@ def train(data):
316316
#
317317
# You can try it by using existing example on Azure
318318
#
319-
# ::
319+
# .. code-block::
320320
#
321321
# pip install azure-storage-blob
322322
# tensorboard --logdir=https://torchtbprofiler.blob.core.windows.net/torchtbprofiler/demo/memory_demo_1_10
@@ -366,7 +366,7 @@ def train(data):
366366
#
367367
# You can try it by using existing example on Azure:
368368
#
369-
# ::
369+
# .. code-block::
370370
#
371371
# pip install azure-storage-blob
372372
# tensorboard --logdir=https://torchtbprofiler.blob.core.windows.net/torchtbprofiler/demo/distributed_bert

0 commit comments

Comments
 (0)