-
Notifications
You must be signed in to change notification settings - Fork 322
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: fix the error of pylint in demo directory #1900
fix: fix the error of pylint in demo directory #1900
Conversation
Signed-off-by: mango <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1900 +/- ##
============================================
- Coverage 75.73% 75.69% -0.05%
Complexity 347 347
============================================
Files 613 613
Lines 117341 117059 -282
Branches 1009 1024 +15
============================================
- Hits 88867 88606 -261
+ Misses 28265 28244 -21
Partials 209 209
Continue to review full report at Codecov.
|
@vagetablechicken have a refactor in #1902, would u pls rework after that ? Currently you can just ignore |
OK. |
I think the two file should be fine after merge. If you are interested in styling from pylint, feel free to comment in #1902 |
Signed-off-by: mango <[email protected]> # Conflicts: # demo/talkingdata-adtracking-fraud-detection/predict_server.py # demo/talkingdata-adtracking-fraud-detection/train_and_serve.py
The refactor in #1902 has been merged, so the modification of the two files also committed in this pr. |
Signed-off-by: mango <[email protected]>
Signed-off-by: mango <[email protected]>
Signed-off-by: mango <[email protected]>
global_args = vars(args) | ||
print(global_args) | ||
logging.info('init args: %s', global_args) | ||
logging.info("init args: %s", global_args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use '' in train_and_serve.py, and use "" here? This file can use '' too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the comment of pylint
(https://github.com/PyCQA/pylint/blob/34c6aede493cfc72dcc94ae9085ab68b49e2960c/pylint/checkers/strings.py#L647-L651), the quote delimiters should used consistently throughout a module, may the rest of train_and_serve
has more ''
, but the file of predict_server.py
has more '
, I think just keep consistent in whole file is ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only ~200 lines, small file, use '
is ok. That's up to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
Signed-off-by: mango <[email protected]>
import gc | ||
import os | ||
import time | ||
import glob | ||
import requests | ||
# fmt:off | ||
import openmldb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't delete import openmldb
. It may get seg fault in some machine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Signed-off-by: mango <[email protected]>
Signed-off-by: mango [email protected]
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix
What is the current behavior? (You can also link to an open issue here)
Part resolved python:
pylint
check found many error #1883What is the new behavior (if this is a feature change)?
None