Skip to content

Conversation

@bhack
Copy link
Contributor

@bhack bhack commented Apr 20, 2021

This is a github Action to support and test tensorflow/tensorflow#48294 and our Gitter thread with /cc @perfinion @angerson. It has two job flat pylint and ci_sanity.sh in tensorflow/tensorflow:devel.

As you can see from the Action log pylint behavior is different if we let it to explore the module itself or if we push a list of python files with find as in our ci_sanity.sh approach.

See also:
https://stackoverflow.com/questions/36873096/run-pylint-for-all-python-files-in-a-directory-and-all-subdirectories
https://pylint.readthedocs.io/en/latest/user_guide/run.html

@angerson
Copy link
Contributor

What's the end goal for this PR? It doesn't seem useful for this repo.

@bhack
Copy link
Contributor Author

bhack commented Apr 26, 2021

The goal of this PR is not to be merged but fast iterate using the Action and understand how we want to execute pylint on the developer machine having the same results as Ubuntu Sanity VM where I have no visibility.

@bhack
Copy link
Contributor Author

bhack commented Apr 26, 2021

/cc @Pierre-Sassoulas Any hint about error differences between passing a file list to pylint vs pylint exploring the module (see Action result diff)?

@Pierre-Sassoulas
Copy link

I did not check everything but pylint need __init__.py to analyse a module, a directory without one won't be analysed. But a file given directly to pylint in such a directory will.

@bhack
Copy link
Contributor Author

bhack commented Apr 27, 2021

@Pierre-Sassoulas I think I've found the issue. With wildcard import :

from tensorflow.python.ops.control_flow_ops import *

The pylint: disable=redefined-builtin in the imported control_flow_ops file is ignored and you got W0622.

If you direct import

from tensorflow.python.ops import control_flow_ops

the pylint: disable=redefined-builtin in contro_flow_ops it seems respected.

@bhack
Copy link
Contributor Author

bhack commented Apr 27, 2021

@angerson Can you let run the Action?

@bhack
Copy link
Contributor Author

bhack commented Apr 27, 2021

Now ci_sanity.py pass. Can we align Ubuntu Sanity VM with the right python/numpy version?

@bhack
Copy link
Contributor Author

bhack commented May 26, 2021

Can you re-run this Action?

@Pierre-Sassoulas
Copy link

You can close and reopen to launch the check again

@bhack
Copy link
Contributor Author

bhack commented May 26, 2021

I don't think that we have this policy but I will try.

@bhack bhack closed this May 26, 2021
@bhack bhack reopened this May 26, 2021
@bhack bhack closed this Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants