Skip to content
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] f-string format updated in plot_example.py #4421

Merged
merged 3 commits into from
Jul 2, 2021

Conversation

amanjha8100
Copy link
Contributor

Contributes to #4136.

@amanjha8100 amanjha8100 changed the title f-string format updated in plot_example.py [examples/python-guide]f-string format updated in plot_example.py Jun 30, 2021
@amanjha8100
Copy link
Contributor Author

Hello, @jameslamb sir, I am not able to understand why the continous-integration/appveyor/pr check failed. Can you give me some insight?

@jameslamb
Copy link
Collaborator

Since this is your first contribution to LightGBM, maintainers have to manually approve each CI run for GitHub Actions. That is a mechanism GitHub put in place a few months ago to prevent abuse.

image

You can click "details" next to the job continuous-integration/appveyor/pr to see what went wrong. I can see in the logs the following error from running the example you've changed in this pull request.

C:\projects\lightgbm\examples\python-guide\plot_example.py:51: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show()
Plotting feature importances...
C:\projects\lightgbm\examples\python-guide\plot_example.py:55: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show()
Plotting split value histogram...
Traceback (most recent call last):
  File "C:\projects\lightgbm\examples\python-guide\plot_example.py", line 58, in <module>
    ax = lgb.plot_split_value_histogram(gbm, feature='f26', bins='auto')
  File "C:\Miniconda37-x64\envs\test-env\lib\site-packages\lightgbm\plotting.py", line 233, in plot_split_value_histogram
    raise ValueError('Cannot plot split value histogram, '
ValueError: Cannot plot split value histogram, because feature f26 was not used in splitting

This probably means you've made a mistake in your changes. I will be able to look more closely and help later, but you might find it's faster to test your changes by running that single example locally before pushing another commit.

cd python-package
python setup.py install
cd ../examples/python-guide
python plot_example.py

examples/python-guide/plot_example.py Outdated Show resolved Hide resolved
@amanjha8100
Copy link
Contributor Author

Well, I have committed the change. I am a little newbie to open-source, thanks for your help @jameslamb.

@amanjha8100
Copy link
Contributor Author

Well, sir because of that, will the PR not get merged?

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
@amanjha8100
Copy link
Contributor Author

Hey, @StrikerRUS is it okay now?

@amanjha8100 amanjha8100 requested a review from jameslamb June 30, 2021 21:48
@jameslamb jameslamb changed the title [examples/python-guide]f-string format updated in plot_example.py [python-package] f-string format updated in plot_example.py Jun 30, 2021
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes look good to me, thanks

@jameslamb jameslamb requested a review from StrikerRUS July 1, 2021 17:44
@amanjha8100
Copy link
Contributor Author

Hey, @StrikerRUS and @guolinke could you please review the changes.😊

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@StrikerRUS StrikerRUS merged commit f37b0d4 into microsoft:master Jul 2, 2021
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants