-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add a Python tutorial template #2264
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
Conversation
✅ Deploy Preview for pytorch-tutorials-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
beginner_source/template_tutorial.py
Outdated
</div> | ||
|
||
To test your tutorial locally, make a copy of this repo and add only your | ||
tutorial removing everything. Then run ``make html``. Verify that all outputs were generated correctly |
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.
Suggest that we add "else": "removing everything" -> "removing everything else"
# | ||
# Example code (the output below is generated automatically): | ||
# | ||
import torch |
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.
[Non-blocking comment]: Will we know which libraries they import just by inspecting their code? I think that is probably the most efficient way. If we ask them to list their imports in a second location--such as above--then we have the possibility that list will get out of sync with what they actually end up importing.
In other words, I think we are all good here as is . . . :-)
beginner_source/template_tutorial.py
Outdated
|
||
To test your tutorial locally, make a copy of this repo and add only your | ||
tutorial removing everything. Then run ``make html``. Verify that all outputs were generated correctly | ||
in the created HTML. |
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.
[Non-blocking comment]: Do we want to start requiring that people run pylint or flake8 or black? Let's discuss--but not a reason to wait on merging.
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.
Suggest one minor text edit, otherwise LGTM.
Address feedback and add another option to build locally
Minor fixes.
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.
I'm so happy.
* Add a Python tutorial template
Add a tutorial template for interactive tutorials stored in Python files.