You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
Activity
tqchen commentedon Sep 4, 2020
I agree. thanks @leandron ! Please send a PR. cc @tkonolige
tkonolige commentedon Sep 4, 2020
Good catch.
When I was adding the pytest-related functions, I originally put them in
tests/python/__init__.pyso 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.pywould becomepython -m tests.python.unittest.test_ir_type.Remove unintentional pytest dependency. Fix #6398 (#6399)
Remove unintentional pytest dependency. Fix apache#6398 (apache#6399)
Remove unintentional pytest dependency. Fix apache#6398 (apache#6399)
Remove unintentional pytest dependency. Fix apache#6398 (apache#6399)
Remove unintentional pytest dependency. Fix #6398 (#6399)