-
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
plot_metric does not work with Booster #4702
Comments
After more hunting I found the workaround from this issue: #1491 which points to this example This took me a surprisingly long time to figure out. I would suggest updating the exception message from plot_metric to give instructions on how to use the method with Booster something like if isinstance(booster, Booster):
raise Exception("to plot the metrics for a Booster type, first output the metrics using evals_result then pass that in to this method as `booster`") |
@js850 Thanks for figuring that out. Good suggestion to make usage of |
Thanks for the suggestion, @shiyu1994. I have created a PR to address this: #4709 |
Closed via #4709. |
This issue has been automatically locked since there has not been any recent activity since it was closed. |
plot_metric works with LGBMModel, but not with lightgbm.basic.Booster.
This seems to be by design, but seems like a clear gap in functionality.
https://github.com/microsoft/LightGBM/blob/master/python-package/lightgbm/plotting.py
I'm just getting started with lightgbm, is there an easy workaround?
The text was updated successfully, but these errors were encountered: