-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process notebooks with pypandoc and a custom pandoc filter #2741
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/2741
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7adf3f6 with merge base 8c48ada ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
requirements.txt
Outdated
tqdm | ||
numpy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not unpin numpy and tqdm, but rather specify versions that do work for you (all those pins were added when updates broke tutorials)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments (most particular, do not unpin the version of dependencies), but overall looks good to me
Co-authored-by: Nikita Shulga <[email protected]>
To fix a number of formatting issues with notebooks, adding
pypandoc
to process the notebooks and a custom pandoc filter and a post-processing script.The custom filter does the following:
Handles admonitions - replaces notes, tips, and warnings with correct HTML blocks.
Before:
Handles blocks of code that have video frames - adds a tag ``` {.python .jupyter-code-cell}
Handles images - prepends the pytorch.org/tutorials to the local paths so that the images display correctly.
Handles 2-colum grid layout - replaces with sid-by side cards:
The post-porocessing script: