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 2020/09/04 15:08:37 UTC

[GitHub] [incubator-tvm] leandron opened a new issue #6398: `import tvm` now requires pytest

leandron opened a new issue #6398:
URL: https://github.com/apache/incubator-tvm/issues/6398


   With the merge of #6331, `import tvm` now requires pytest. I created this issue just to check whether this is something intentional or something that we want to fix.
   
   The chain from `import tvm` to `import pytest` happens due to the `from .import testing` on `python/tvm/__init__.py`. There is nothing actually done with that import.
   
   https://github.com/apache/incubator-tvm/blob/a4ebb16ed76bfea4ce4eed7be7ea73d4a01027e2/python/tvm/__init__.py#L53-L56
   
   Within `python/tvm/testing.py` then there is the `import pytest`. I was thinking that we might want to remove these lines from `__init__.py`, so that we don't load `tvm.testing` and will only import it when required. I'm happy to submit a PR removing those lines, in case there is an understanding that it makes sense.
   
   cc @tqchen 


----------------------------------------------------------------
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.

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



[GitHub] [incubator-tvm] tkonolige commented on issue #6398: `import tvm` now requires pytest

Posted by GitBox <gi...@apache.org>.
tkonolige commented on issue #6398:
URL: https://github.com/apache/incubator-tvm/issues/6398#issuecomment-687243358


   Good catch.
   
   When I was adding the pytest-related functions, I originally put them in `tests/python/__init__.py` so they would be local to the tests. Unfortunately, doing this meant that you could no longer run files directly. Instead you'd have to specify the module path. For example, `python tests/python/unittest/test_ir_type.py` would become `python -m tests.python.unittest.test_ir_type`.


----------------------------------------------------------------
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.

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



[GitHub] [incubator-tvm] yzhliu closed issue #6398: `import tvm` now requires pytest

Posted by GitBox <gi...@apache.org>.
yzhliu closed issue #6398:
URL: https://github.com/apache/incubator-tvm/issues/6398


   


----------------------------------------------------------------
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.

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



[GitHub] [incubator-tvm] tqchen commented on issue #6398: `import tvm` now requires pytest

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #6398:
URL: https://github.com/apache/incubator-tvm/issues/6398#issuecomment-687220104


   I agree. thanks @leandron !


----------------------------------------------------------------
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.

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



[GitHub] [incubator-tvm] tqchen edited a comment on issue #6398: `import tvm` now requires pytest

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on issue #6398:
URL: https://github.com/apache/incubator-tvm/issues/6398#issuecomment-687220104


   I agree. thanks @leandron ! cc @tkonolige 


----------------------------------------------------------------
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.

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



[GitHub] [incubator-tvm] tqchen edited a comment on issue #6398: `import tvm` now requires pytest

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on issue #6398:
URL: https://github.com/apache/incubator-tvm/issues/6398#issuecomment-687220104


   I agree. thanks @leandron ! Please send a PR. cc @tkonolige 


----------------------------------------------------------------
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.

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