You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2023/01/03 23:54:18 UTC

[GitHub] [tvm] driazati opened a new pull request, #13689: [docs] Remove empty code blocks

driazati opened a new pull request, #13689:
URL: https://github.com/apache/tvm/pull/13689

   This fixes some of the issues highlighted in #13668, the parser that
   checks to ensure that the hidden import is placed in the right spot was
   incorrect, this includes some fixes to get it working for the cases in
   that issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on pull request #13689: [docs] Remove empty code blocks

Posted by GitBox <gi...@apache.org>.
guberti commented on PR #13689:
URL: https://github.com/apache/tvm/pull/13689#issuecomment-1377675817

   For what it's worth, I've never been a fan of how we need to add the following to _every_ tutorial:
   ```python
   # sphinx_gallery_start_ignore
   from tvm import testing
   
   testing.utils.install_request_hook(depth=3)
   # sphinx_gallery_end_ignore
   ```
   Instead, we could use [`reset_modules`](https://sphinx-gallery.github.io/stable/advanced.html#custom-reset) from sphinx-gallery's configuration to run code before every example. It would be pretty straightforward:
   
   ```python
   from tvm import testing
   def add_hook(gallery_conf, fname):
       testing.utils.install_request_hook(depth=3)
   
   sphinx_gallery_conf = {
       ...
       'reset_modules': (add_hook),
   }
   ```
   
   If we needed the hook for `pytest` as well, we could add a `conf.py` file to the `gallery` directory as well. We shouldn't change this here, but it might be worth considering in the future @driazati.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] driazati merged pull request #13689: [docs] Remove empty code blocks

Posted by GitBox <gi...@apache.org>.
driazati merged PR #13689:
URL: https://github.com/apache/tvm/pull/13689


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] driazati commented on pull request #13689: [docs] Remove empty code blocks

Posted by GitBox <gi...@apache.org>.
driazati commented on PR #13689:
URL: https://github.com/apache/tvm/pull/13689#issuecomment-1379467892

   I updated the PR to wrap the configs with ignores and made sure they are inside a code block so they don't show up on their own, so now this PR should make everything look fine from the frontend. We could merge this then update the sphinx gallery version (installing from the latest commit isn't a problem with Docker) and remove the `_ignore` tags.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] driazati commented on pull request #13689: [docs] Remove empty code blocks

Posted by GitBox <gi...@apache.org>.
driazati commented on PR #13689:
URL: https://github.com/apache/tvm/pull/13689#issuecomment-1378082218

   @guberti that makes a lot more sense, I updated the PR to use that and delete the linter which wasn't really correct anyways (some of the preamble was misplaced in a few files).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #13689: [docs] Remove empty code blocks

Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13689:
URL: https://github.com/apache/tvm/pull/13689#issuecomment-1370340148

   <!---bot-comment-->
   
   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](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on pull request #13689: [docs] Remove empty code blocks

Posted by GitBox <gi...@apache.org>.
guberti commented on PR #13689:
URL: https://github.com/apache/tvm/pull/13689#issuecomment-1378321341

   I love this PR.
   
   <p align="center">
     <img width="200" src="https://user-images.githubusercontent.com/3069006/211739471-a7a9846a-9683-4be6-9a08-5c448eff4df4.png">
   </p>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on a diff in pull request #13689: [docs] Remove empty code blocks

Posted by GitBox <gi...@apache.org>.
guberti commented on code in PR #13689:
URL: https://github.com/apache/tvm/pull/13689#discussion_r1066139532


##########
tests/lint/check_request_hook.py:
##########
@@ -41,19 +41,24 @@ def find_code_block_line(lines: List[str]) -> Optional[int]:
     """
     in_multiline_string = False
     in_sphinx_directive = False
+    in_standalone_comment = True
 
     i = 0
     lines = lines[APACHE_HEADER_LINES:]
     while i < len(lines):
         line = lines[i].strip()
+        in_comment = False

Review Comment:
   delete?
   ```suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org