-
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 Google Colab support to tutorials #10706
Comments
For this to be effective, perhaps it would be good to have a pre-build Colab binary of TVM than can be Otherwise the notebook would always need to begin with the user downloading and building TVM from scratch. |
As of December this year, we had a |
That's great, I must have missed that talk. Do you have a link for it? Is this the TLCPack mentioned in the current docs, or some other system? |
Yep, it's TLCPack - you just have to run:
You can see the talk here - I use a Python notebook to compile a model for Arduino. I'm currently working on adapting a version of that notebook to be included with the docs (working on and off - I'm in school right now) but that's my motivation for this feature/ |
@guberti we are in the process of adding TVM pip release. So we should be able to use |
Over the last two weeks, I've spent some cycles trying to understand how this would work. On the surface, it is simple enough - just add a link to the TVM site repo. For example, clicking on this URL will open the However, if you try messing around with that At some point, we ought to have a discussion about whether
Once these pull requests get merged, then if we choose to update our sphinx-gallery version, we will be able to generate |
I have a prototype of this working! See #10921, though it still requires those changes to Sphinx Gallery mentioned above. You can also check out the HTML tutorial at: |
This feature is now working on production! See https://tvm.apache.org/docs/how_to/work_with_microtvm/micro_train.html. Hopefully having a working example makes it easier for other tutorial writers to also add Colab support. |
Add "Open in Google Colab" button to .ipynb tutorials
On Tensorflow's doc sites, each interactive tutorial has a one-click open to open it on Google Colab - Google's interactive web editor for Python notebooks. See this example for post training integer quantization (screenshot below).
I'm currently messing around with some microTVM tutorials, so I'll see if I can get a demo of this running there. "Open in Colab" is one of my favorite things about the Tensorflow and Keras docs, and I'd love to integrate the feature here too.
Additions/Changes Requested
While the buttons look fancy, each is just a URL underneath. The "view source on Github" link is just a hardcoded URL to the Github repo - nothing fancy. For the open in Colab button, we just take that same hardcoded URL, but prepend "colab.research.google.com" and Colab takes care of the rest. Here's the link that powers the button above:
https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/performance/post_training_integer_quant.ipynb
The text was updated successfully, but these errors were encountered: