-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[docs] Add "Open with Colab" button to documentation #13627
Conversation
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
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.
Thank you for very good improvements of TVM documentation. Looks awesome! Some comments:
docs/conf.py
Outdated
This tutorial can be used interactively with Google Colab! You can also click | ||
:ref:`here <sphx_glr_download_{1}>` to run the Jupyter notebook locally. | ||
|
||
.. image:: https://raw.githubusercontent.com/guberti/web-data/main/images/utilities/colab_button.svg |
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.
Not sure about this path to the image. Probably, we should upload this image file to https://github.com/tlc-pack/web-data
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.
While I had reviewed your PR, I found that the same image file was already used in gallery/how_to/work_with_microtvm/micro_train.py
. So probably, you can reuse this link: https://raw.githubusercontent.com/tlc-pack/web-data/main/images/utilities/colab_button.png
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.
During the Hackathon, I redid this image to be a cleaner SVG. I've got a PR out to update this and remove the png
version - see tlc-pack/web-data#18.
@@ -30,6 +30,29 @@ | |||
or on Zephyr platform on a microcontroller/board supported by Zephyr. | |||
""" | |||
|
|||
###################################################################### | |||
# | |||
# .. include:: ../../../../gallery/how_to/work_with_microtvm/install_zephyr.rst |
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.
Tried to find where else you have included this install_zephyr.rst
. But didn't find it. Probably you can just move the context of install_zephyr.rst
to this file?
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'd be in favor of this, but I'd love to get thoughts from @mehrdadh.
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.
This file should be added to all microTVM Zephyr tutorials. I think some of them are missing in this PR. That's why we refactored it to a separate file
@echuraev thanks for the very fast review! We weren't quite done with the PR at the time, so a few of your comments are now outdated. I've addressed the others, though - thanks for the feedback! You also asked about CPU versus GPU runtimes for Google Colab. Unfortunately, these can only be selected from the drop-down menu. However, I modified |
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.
thanks @guberti ! added some feedback here, mostly just formatting and clarifications
Updated pyproject and lock file with apache tvm Auto-generate Colab header add requirements.txt Use SVG icon update requirement.txt
Fix how_to/compile_models to work in Colab Get Relay tutorials working with Colab Extend TVM tutorials in Colab remove tvm from requirements.txt Add support for multiple versions Revert "Extend TVM tutorials in Colab" This reverts commit 0f6037c. Revert "Get Relay tutorials working with Colab" This reverts commit 1c4cdfd. Fix up compile models tutorials Better working with Pytorch instructions
qemu binary doesnt run Use include Fix import Hack to correctly handle literalinclude Add required empty line add custom directive Strip iPython magic from HTML Fix syntax highlighting issue
Revert "Hack to render %env correctly" This reverts commit 9690a2b. Fix whitespace fix empty block move py to rst Add include directive support fix refactor cmsis in RST file add pytorch support
TVM dev bugfix change shell to bash updating microTVM tutorials move to relative home directory lint lint part 2 back to /content
Fix warnings from RST import
Use interactive %%shell instead of %%bash Revert eliminations of cuda() call Remove build hacks Don't re-install non-GPU Torch versions Revert comment issue Address some comments from code review
Flag tutorials that require cuda Clarify docstring slightly Change position of requires_cuda config Allow other sphinx_gallery flags inside request hook Fix comments and admonition directives Fix microTVM install scripts
d96c88d
to
af8e90a
Compare
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.
sorry for delay in review, LGTM!
* Add Colab header to TVM tutorials by default * Fix library imports to work with Colab * Better support for Jupyter magic and directives Co-authored-by: Mehrdad Hessar <mhessar@octoml.ai>
This pull request adds an "Open in Colab" button to all of TVM's tutorials. With one click, users can play around with and modify the TVM docs without having to install anything locally. The docs will now have this button at the top:
There seems to be an issue with @tvm-bot building docs right now (see other PRs), so I don't have a live demo. You can try it locally by cloning the repo and following the steps in docs/README.md. You can also check out a few examples here:
This pull request was co-authored by @guberti, @mehrdadh, @areusch, @mkatanbaf, and @alanmacd as a hackathon project.