-
Notifications
You must be signed in to change notification settings - Fork 755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] Correct isort setup #288
Conversation
What's the |
@innerlee Not error, just code requirements.... Can be ignored acctually. |
@innerlee. I just want to add the following line:
to onnx2tensorrt.py. But found that mmdet should be the third party of this repo and tools should be added to the first party. |
Okay, why |
The tools folder is imported in some of my PRs... But I forgot to add it to 'known_first_party' of this repo... If not specified, isort will move lines to 'known_third_party'. Actually, move 'mmdet' to 'known_third_party' may cause some conflicts to somebody working on new PRs. So, I am not sure if it should be done in this PR. Maybe it should be done by the owner of this repo. |
Codecov Report
@@ Coverage Diff @@
## main #288 +/- ##
=======================================
Coverage 85.81% 85.81%
=======================================
Files 132 132
Lines 8824 8824
Branches 1233 1233
=======================================
Hits 7572 7572
Misses 954 954
Partials 298 298
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This part is what I was concerning about. Can this "import" be avoided in some way?
We do not have such restrictions. Contributions of any form are always welcome. |
Hi, @innerlee. It can be avoided through replacing "from tools.deployment.deploy_helper import sth" with "from .deploy_helper import sth" or "from deploy_helper import sth". What is your suggestion? Seems mmdet prefers the former. |
tools are stand-alone scripts. If something are reusable, then they should live in the package. So my suggestion is to move deploy_helper inside |
Hi, @innerlee. How about this. In this PR, I only do the following stuff:
I will move deploy_helper.py to mmocr in the next PR which aims to evaluate exported onnx and tensorrt files. Related unit tests will be added then. |
fair enough. Its better to remove |
Hi, "# noqa: F401" was used because crop_img was not used. However, if not importing this func, a registry error will occur. |
Just like here |
Its easy to add some meaningless/unharmful ops for them like |
* isort * remove tools from setup.cfg
* isort * remove tools from setup.cfg
Hi, this is a PR for correcting isort setup.
Mainly changed:
modify mmdet to 'known_third_party' in setup.cfg and add tools to 'known_first_party' in setup.cfg