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/01/12 03:53:07 UTC

[GitHub] [incubator-tvm] cclauss opened a new pull request #4690: WIP: Flake8: Add undefined names test

cclauss opened a new pull request #4690: WIP: Flake8: Add undefined names test
URL: https://github.com/apache/incubator-tvm/pull/4690
 
 
   Work in Progress: Do not merge.  
   
   F82 tests are almost always _undefined names_ which are usually a sign of a typo, missing imports, or code that has not been ported to Python 3.  These also would be compile-time errors in a compiled language but in Python a __NameError__ is raised which will halt/crash the script on the user. 
   
   This test on this repo raises a lot of false reports because it gets really confused by the [HYBRID_GLOBALS](https://github.com/apache/incubator-tvm/blob/master/python/tvm/hybrid/runtime.py#L113) approach of adding globals without declaring them as globals in the local scope.  (This could be overcome by adding them as `--builtins=` in the flake8 command.)
   
   However, there are other undefined names that are not in HYBRID_GLOBALS that should be addressed such as the missing import of tensorflow.
   
   Thanks for contributing to TVM!   Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @ them in the pull request thread.
   

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on issue #4690: WIP: Flake8: Add undefined names test

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #4690: WIP: Flake8: Add undefined names test
URL: https://github.com/apache/incubator-tvm/pull/4690#issuecomment-584835748
 
 
   close for now per the reasons stated above

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on issue #4690: WIP: Flake8: Add undefined names test

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #4690: WIP: Flake8: Add undefined names test
URL: https://github.com/apache/incubator-tvm/pull/4690#issuecomment-573386297
 
 
   There are quite a few cases that might causes us to not being able to use this.
   
   - Hybrid script where we are using a syntax parsing 
   - The FFI case where the functions are initialized by setattr by [query the FFI](https://github.com/apache/incubator-tvm/blob/master/python/tvm/_ffi/function.py#L329)
   
   
   
   
   

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen edited a comment on issue #4690: WIP: Flake8: Add undefined names test

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on issue #4690: WIP: Flake8: Add undefined names test
URL: https://github.com/apache/incubator-tvm/pull/4690#issuecomment-573386528
 
 
   BTW, some of the undefined name error might already have been covered by pylint https://github.com/apache/incubator-tvm/blob/master/Makefile#L76  (never mind, it was disabled for the reasons mentioned above)
   
   

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on issue #4690: WIP: Flake8: Add undefined names test

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #4690: WIP: Flake8: Add undefined names test
URL: https://github.com/apache/incubator-tvm/pull/4690#issuecomment-573386528
 
 
   BTW, some of the undefined name error might already have been covered by pylint https://github.com/apache/incubator-tvm/blob/master/Makefile#L76 
   
   

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen edited a comment on issue #4690: WIP: Flake8: Add undefined names test

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on issue #4690: WIP: Flake8: Add undefined names test
URL: https://github.com/apache/incubator-tvm/pull/4690#issuecomment-573386528
 
 
   BTW, some of the undefined name error might already have been covered by pylint https://github.com/apache/incubator-tvm/blob/master/Makefile#L76  (never mind, it was [disabled](https://github.com/apache/incubator-tvm/blob/master/tests/lint/pylintrc#L85) for the reasons mentioned above)
   
   

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen closed pull request #4690: WIP: Flake8: Add undefined names test

Posted by GitBox <gi...@apache.org>.
tqchen closed pull request #4690: WIP: Flake8: Add undefined names test
URL: https://github.com/apache/incubator-tvm/pull/4690
 
 
   

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen edited a comment on issue #4690: WIP: Flake8: Add undefined names test

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on issue #4690: WIP: Flake8: Add undefined names test
URL: https://github.com/apache/incubator-tvm/pull/4690#issuecomment-573386297
 
 
   There are quite a few cases that might causes us to not being able to use this.
   
   - Hybrid script where we are using a syntax parsing 
   - The FFI case where the functions are initialized by setattr by [query the FFI](https://github.com/apache/incubator-tvm/blob/master/python/tvm/_ffi/function.py#L329).
   
   
   
   
   

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


With regards,
Apache Git Services

[GitHub] [incubator-tvm] cclauss commented on pull request #4690: WIP: Flake8: Add undefined names test

Posted by GitBox <gi...@apache.org>.
cclauss commented on pull request #4690:
URL: https://github.com/apache/incubator-tvm/pull/4690#issuecomment-654874709


   @tqchen What is the status of this.  I see the repo still has 367 _undefined names_ and some of them look like they should be fixed but on others, they look like tvm magic variable creation.


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