-
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] Sphinx -- Introduce alias detection. #4954
Conversation
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.
You could apply the patch I just made to fix all warnings except one if you don't mind: https://gist.github.com/comaniac/e0de4c4de0f94fcfc81341f3fd463833
(The patch is based on this PR).
tutorials/language/intrin_math.py
Outdated
@@ -66,7 +66,7 @@ | |||
# TVM intrinsic provides the user a mechanism to achieve this, and this | |||
# is the recommended way to solve the problem. | |||
# The following code use te.exp instead, which create an intrinsic call | |||
# :any:`te.exp` to do the exponential. | |||
# :py::func:`te.exp` to do the exponential. |
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.
Miss one at line 91.
Background: some of our namespaces import function from another namespace. For example tvm.te imports most of the operators from tvm.tir. Previously we manually exclude these aliases from the doc. However that means we can not link them by the alias name. This PR adds a sphinx callback plugin to detect such aliases, and create a rubric block on the button of its current docstring `Alias of the original class`. It is done in a way so that we can refer to the generated docs. We also fixed a few docs errors.
@comaniac updated, also cc @ZihengJiang @icemelon9 |
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.
LGTM. Verified locally and only one warning left.
We should start setting up the doc check as #4908 mentioned to avoid more warnings in the future.
* [DOCS] Sphinx -- Introduce alias detection. Background: some of our namespaces import function from another namespace. For example tvm.te imports most of the operators from tvm.tir. Previously we manually exclude these aliases from the doc. However that means we can not link them by the alias name. This PR adds a sphinx callback plugin to detect such aliases, and create a rubric block on the button of its current docstring `Alias of the original class`. It is done in a way so that we can refer to the generated docs. We also fixed a few docs errors. * Fix most of the issues
* [DOCS] Sphinx -- Introduce alias detection. Background: some of our namespaces import function from another namespace. For example tvm.te imports most of the operators from tvm.tir. Previously we manually exclude these aliases from the doc. However that means we can not link them by the alias name. This PR adds a sphinx callback plugin to detect such aliases, and create a rubric block on the button of its current docstring `Alias of the original class`. It is done in a way so that we can refer to the generated docs. We also fixed a few docs errors. * Fix most of the issues
* [DOCS] Sphinx -- Introduce alias detection. Background: some of our namespaces import function from another namespace. For example tvm.te imports most of the operators from tvm.tir. Previously we manually exclude these aliases from the doc. However that means we can not link them by the alias name. This PR adds a sphinx callback plugin to detect such aliases, and create a rubric block on the button of its current docstring `Alias of the original class`. It is done in a way so that we can refer to the generated docs. We also fixed a few docs errors. * Fix most of the issues
Background: some of our namespaces import function from another
namespace. For example tvm.te imports most of the operators from tvm.tir.
Previously we manually exclude these aliases from the doc.
However that means we can not link them by the alias name.
This PR adds a sphinx callback plugin to detect such aliases, and create a rubric block
on the button of its current docstring
Alias of the original class
.It is done in a way so that we can refer to the generated docs.
We also fixed a few docs errors.