-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[python-package] Add progress_bar
callback using tqdm
#5867
Conversation
0065605
to
d1f39ea
Compare
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.
Thanks for the suggestion! But I don't support adding this much complexity and maintenance burden to the project in exchange for a progress bar.
I'd welcome the addition of this callback as documentation, like in https://github.com/microsoft/LightGBM/tree/master/examples/python-guide, but not as an addition to the project's public API which needs to be maintained.
@jmoralez what do you think?
Hello, thank you very much for your prompt reply and great project.😀 I understand your sentiments, but I would like to ask you to merge this PR, as there are so many LightGBM extension packages in this world that users get confused. The code may look long, but the Black formatting just adds lines and does not change the existing code. I don't think adding documentation or merging would make any difference in the maintenance burden. Copy-pasting the documentation code every time is a pain. |
What is this a reference to? Can you share some links to what you mean by "LightGBM extension packages"? |
ee1daee
to
0dfc5f1
Compare
0dfc5f1
to
8f07b5c
Compare
This is not true. Here are some examples of things that could be avoided if this change were only made in
Nothing in This PR is proposing going further than "make it possible", instead proposing "please make it a new part of the public API of the package", which comes with the maintenance burden of continuing to guarantee that the code works in the wide range of operating systems and Python versions LightGBM supports. I am not convinced that the inconvenience of not having such code available via If you choose to answer the request in #5867 (review) for some specific examples of the claim "there are so many LightGBM extension packages in this world that users get confused", that might change my opinion. If another maintainer like @jmoralez makes a convincing case for adding something like this to the library, that might change my opinion. But as of now, I am -1 on including this code in LightGBM. I'd consider adding a simpler version of it (for example, without the hard-coded list of |
I have given up on PR and created a package that addresses #5867, #4805, #3313 / #5808 at once and would appreciate if you could add it to the examples. https://github.com/34j/lightgbm-callbacks |
Alright, I'll close this.
At this time, it doesn't look to me like that project is being used by many people (according to https://pypistats.org/packages/lightgbm-callbacks) or that it's doing something so significantly different from what's possible with LightGBM that it should be added to https://github.com/microsoft/LightGBM#external-unofficial-repositories. If that changes in the future, I'd happily consider a PR to add a mention of it to https://github.com/microsoft/LightGBM#external-unofficial-repositories. If you'd like to answer the question I posed at #5867 (comment) with several examples, I'd also consider a callbacks-for-the-Python-package-specific section of the project's documentation at https://github.com/microsoft/LightGBM/blob/master/python-package/README.rst. |
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Use tqdm to display training progress and metrics and, if necessary, early_stopping results. tqdm does not need to be installed and is compatible with the existing code.
Example:
I tried
sys.stderr.flush()
and so on, but the output was inevitably broken when usingtqdm.std.tqdm
.