-
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
Capture LGBM model's .fit messages and redirect them to python logger #1493
Comments
At present practically all messages (except a few warnings) come directly from the C++ code to the stdout/stderr. So, there is no way to manage them by Python's |
@guolinke @chivee |
Hey, Thanks for the reply! As a work-around (because I was interested in the messages related to early stopping), I just took the But, for anyone else interested in the matter, I highly discourage from using my previous work-around, the one with the
hack. |
@MTDzi Thank you for sharing your experience! |
@guolinke @chivee |
@StrikerRUS |
@guolinke I mean, create a callback at cpp side for all logs, which can be used at Python/R/whatever_language side: |
@guolinke Is it possible? |
@StrikerRUS I think it is easy to implement. But I don't have time recently... |
@StrikerRUS It seems different. The problem in R is to redirect the log to R's console, and need to interact with R's library. |
Closed in favor of being in #2302. We decided to keep all feature requests in one place. Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature. |
I'm using the
logging
Python module in my project and would like to be able to capture the messages produced by thelightgbm.sklearn.LGBMClassifier.fit
method.So far, I've re-directed the
STDOUT
to the logging file:but in doing so, I'm also re-directing output from the debugger -- not good.
How can I do it better?
The text was updated successfully, but these errors were encountered: