Skip to content

fix(optimization_tutorial): bullet list indentation in colab#3940

Open
ribhuji wants to merge 1 commit into
pytorch:mainfrom
ribhuji:fix-optimization-list-indentation
Open

fix(optimization_tutorial): bullet list indentation in colab#3940
ribhuji wants to merge 1 commit into
pytorch:mainfrom
ribhuji:fix-optimization-list-indentation

Conversation

@ribhuji

@ribhuji ribhuji commented Jul 21, 2026

Copy link
Copy Markdown

Fixes #3939

Description

Bullet lists under "Hyperparameters", "Optimization Loop", and "Inside the training loop" sections in optimization_tutorial.py were rendering as inline text or blockquotes in the generated Jupyter notebook.

Root cause: Two issues in the sphinx-gallery to pypandoc pipeline:

  1. The list items used # - (3 spaces after #). After sphinx-gallery strips # , the dash was not at column 0, causing pandoc to treat the list as a block quote.
  2. There was no blank line between the preceding paragraph and the list, so pandoc joined everything into one run-on sentence.

Fix: Changed the indentation to # - (dash at column 0 after stripping) and added a blank # line before each list — matching the convention used by dozens of other tutorials in this repo.

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.

Testing

  1. Built the tutorial locally
GALLERY_PATTERN="optimization_tutorial.py" sphinx-build -D plot_gallery=0 -b html . _build/html
  1. Uploaded _build/html/_downloads/.../optimization_tutorial.ipynb to Colab.

Colab link - https://colab.research.google.com/drive/1pTyCPUD8WJmRs1x54V2GpF4c2ke1DlQf?usp=sharing

SS

image

@pytorch-bot

pytorch-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3940

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla

meta-cla Bot commented Jul 21, 2026

Copy link
Copy Markdown

Hi @ribhuji!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@meta-cla

meta-cla Bot commented Jul 21, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the cla signed label Jul 21, 2026
@ribhuji

ribhuji commented Jul 21, 2026

Copy link
Copy Markdown
Author

@sekyondaMeta @svekars please do look at this minimal change.

Tagging acc to this - https://docs.pytorch.org/docs/main/community/persons_of_interest.html#docs-tutorials

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - Incorrect rendering on google colab

1 participant