From d38aa4cc437e87ffad4ed035cfeccfcc8770de97 Mon Sep 17 00:00:00 2001 From: Kiersten Stokes Date: Thu, 1 Jun 2023 11:17:49 -0500 Subject: [PATCH] Change formatting of code blocks for correct rendering in Colab --- .../tensorboard_profiler_tutorial.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/intermediate_source/tensorboard_profiler_tutorial.py b/intermediate_source/tensorboard_profiler_tutorial.py index 440f2257e1..2b241071b7 100644 --- a/intermediate_source/tensorboard_profiler_tutorial.py +++ b/intermediate_source/tensorboard_profiler_tutorial.py @@ -18,7 +18,7 @@ ----- To install ``torch`` and ``torchvision`` use the following command: -:: +.. code-block:: pip install torch torchvision @@ -160,7 +160,7 @@ def train(data): # # Install PyTorch Profiler TensorBoard Plugin. # -# :: +# .. code-block:: # # pip install torch_tb_profiler # @@ -168,7 +168,7 @@ def train(data): ###################################################################### # Launch the TensorBoard. # -# :: +# .. code-block:: # # tensorboard --logdir=./log # @@ -176,7 +176,7 @@ def train(data): ###################################################################### # Open the TensorBoard profile URL in Google Chrome browser or Microsoft Edge browser. # -# :: +# .. code-block:: # # http://localhost:6006/#pytorch_profiler # @@ -287,7 +287,7 @@ def train(data): # In this example, we follow the "Performance Recommendation" and set ``num_workers`` as below, # pass a different name such as ``./log/resnet18_4workers`` to ``tensorboard_trace_handler``, and run it again. # -# :: +# .. code-block:: # # train_loader = torch.utils.data.DataLoader(train_set, batch_size=32, shuffle=True, num_workers=4) # @@ -316,7 +316,7 @@ def train(data): # # You can try it by using existing example on Azure # -# :: +# .. code-block:: # # pip install azure-storage-blob # tensorboard --logdir=https://torchtbprofiler.blob.core.windows.net/torchtbprofiler/demo/memory_demo_1_10 @@ -366,7 +366,7 @@ def train(data): # # You can try it by using existing example on Azure: # -# :: +# .. code-block:: # # pip install azure-storage-blob # tensorboard --logdir=https://torchtbprofiler.blob.core.windows.net/torchtbprofiler/demo/distributed_bert