-
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] microTVM model training tutorial with Colab support #10921
Conversation
How does "Open in Colab" work?Google Colab has a feature where using a URL, What had to be changed to get this working?In theory, nothing about Sphinx Gallery would have to be changed to make this work. However, in practice the generation of
These have all been merged, but a new version of sphinx-gallery has not yet been released yet. Until then, I had to set pip to install I also needed some new data files and graphics for this tutorial. Those can be found at: Currently, the URLs in the tutorial point to my fork of the I did a similar thing for Lastly, #11164 was needed so that microTVM template projects could be used in the CI. |
This is fantastic, I’ll try it out today! Colab will be great to have in the docs. If the sphinx-gallery PRs don’t get merged in a timely manner we can apply your patches and build it from source in the Docker images so we don’t need to wait |
To enable apache#10921 this builds sphinx-gallery using @guberti's changes
To enable apache#10921 this builds sphinx-gallery using @guberti's changes
To enable apache#10921 this builds sphinx-gallery using @guberti's changes
To enable apache#10921 this builds sphinx-gallery using @guberti's changes
53d13fd
to
f501842
Compare
retriggered now that #11164 has landed |
@guberti could you try pushing an empty commit? i think retriggering somehow didn't pick up the right Jenkinsfile changes. |
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, few questions
cc @jwfromm @junrushao1994 @tqchen @Mousius in case you would like to have a look over this
tests/scripts/ci.py
Outdated
@@ -267,7 +267,7 @@ def docs( | |||
"tlcpack-sphinx-addon==0.2.1", | |||
"synr==0.5.0", | |||
"image==1.5.33", | |||
"sphinx-gallery==0.4.0", | |||
"git+https://github.com/guberti/sphinx-gallery.git@ipynb-include-bash", |
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.
should we update docker/install scripts too if we're going to go this route? also, is this based off 0.4.0? may need to backport or verify it won't break anything to update.
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.
No, this is based on the latest sphinx-gallery version. You're right that this could potentially cause problems, but I haven't ran into any. We should definitely verify nothing breaks, and if there is an issue we can discuss backporting.
Thanks for taking a look! Addressed your comments and merged |
fb50053
to
ff377e9
Compare
b525482
to
339d646
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.
Ahh sorry I didn't notice we weren't pinning. Aside from that I think we can merge.
tests/scripts/task_python_docs.sh
Outdated
@@ -84,6 +84,7 @@ IGNORED_WARNINGS=( | |||
'autotvm:Cannot find config for target=llvm -keys=cpu -link-params=0' | |||
'autotvm:One or more operators have not been tuned. Please tune your model for better performance. Use DEBUG logging level to see more details.' | |||
'autotvm:Cannot find config for target=cuda -keys=cuda,gpu' | |||
'absl:For model inputs containing unsupported operations' |
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.
Can you link me to an example log line?
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.
The full error is:
WARNING:absl:For model inputs containing unsupported operations which cannot be quantized, the `inference_input_type` attribute will default to the original type.
This warning also occurs in the official TensorFlow tutorial - https://www.tensorflow.org/lite/performance/post_training_integer_quant.
2599fb7
to
14ece0b
Compare
Changes from code review Use official sphinx-gallery repo Correctly specify version Import pyserial only when necessary
Try to avoid throwing warning Fix linting, try verbosity filter Try adding to ignore file Remove fix attempts
Include full git hashes
14ece0b
to
14e5750
Compare
This PR adds a new tutorial to the microTVM how_to gallery, showing how a MobileNet V1 model can be trained with transfer learning and modified to fit on embedded devices (in this case, the Arduino Nano 33 BLE). This tutorial also addresses #10706 by showing what it would take to allow tutorials to be opened using Google Colab. See the below screenshot, or view the HTML page at the link below:
Alternatively, to make it easier I've also copied the output HTML file, and hosted it at the following link:
https://guberti.github.io/tvm-docs-proof-of-concept/