Mousius opened a new pull request #9284:
URL: https://github.com/apache/tvm/pull/9284


   There's a few errors that come up when type checking that aren't triggering 
any failures:
   ```
   Checking MyPy Type defs in the meta schedule package.
   python/tvm/meta_schedule/utils.py:23:1: error: Cannot find implementation or 
library stub for module named "psutil"
   python/tvm/meta_schedule/utils.py:23:1: note: See 
https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
   python/tvm/meta_schedule/search_strategy/search_strategy.py: note: In member 
"__init__" of class "MeasureCandidate":
   python/tvm/meta_schedule/search_strategy/search_strategy.py:59:13: error: 
Module has no attribute "MeasureCandidate"
   python/tvm/meta_schedule/search_strategy/search_strategy.py: note: In member 
"initialize_with_tune_context" of class "SearchStrategy":
   python/tvm/meta_schedule/search_strategy/search_strategy.py:83:9: error: 
Module has no attribute "SearchStrategyInitializeWithTuneContext"
   ```
   
   To rectify this the `types-psutil` package adds type hints for `mypy` and `# 
type: ignore` stops `mypy` from trying to figure out types of `_ffi_api` 
resources.
   
   There's also a few places where variable type definitions are repeated even 
though they're only required once.
   
   Finally, I've ensured `task_mypy.sh` fails the build since it's stable right 
now, using `set -e`.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to