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

Add alt text for gcc-tips #4175

Closed
wants to merge 5 commits into from
Closed

Add alt text for gcc-tips #4175

wants to merge 5 commits into from

Conversation

akshitadixit
Copy link
Contributor

@akshitadixit akshitadixit commented Apr 14, 2021

Closes #4028

Added alt text for images in gcc-tips.rst, sorry for taking this long, was reading about things since I did not fully understand all of the images. Kindly review and suggest in case I missed on something.

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.

Thank you so much for taking this on @akshitadixit ! This page has received very little attention in the 3+ years since this content was first introduced, and I understand that it's pretty difficult to interpret some of the plots there, which don't have any explanatory text. This is the first time I've actually read this page and even I was pretty confused by some of it.

I left some suggestions below, but we'll also need to wait for another maintainer to comment on my questions about possibly removing some of these plots.

By the way...I noticed that you made this PR from the master branch on your fork. Since you're planning to help us with other things (#4136 (comment)), in the future you'll probably find it useful to create a new branch on your fork for each pull request. That way, you can have multiple pull requests into this project active at the same time.

docs/gcc-Tips.rst Outdated Show resolved Hide resolved

.. image:: ./_static/images/gcc-bars.png
:align: center
:target: ./_static/images/gcc-bars.png
:alt: picture of a simple bar chart against running time
Copy link
Collaborator

Choose a reason for hiding this comment

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

To be honest, I'm seeing this image for the first time and it doesn't make much sense to me. It seems to be saying that the runtime for training was lower as max_depth was increased. That doesn't make sense to me.

@StrikerRUS do you understand it?

this one: https://lightgbm.readthedocs.io/en/latest/_static/images/gcc-bars.png

docs/gcc-Tips.rst Outdated Show resolved Hide resolved
docs/gcc-Tips.rst Outdated Show resolved Hide resolved
docs/gcc-Tips.rst Outdated Show resolved Hide resolved
docs/gcc-Tips.rst Outdated Show resolved Hide resolved

.. image:: ./_static/images/gcc-meetup-2.png
:align: center
:target: ./_static/images/gcc-meetup-2.png
:alt: comparison of cumulative speed versus the slowest density of each algorithm at various depths with v-2, O-3 remaining constant almost in all cases
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think these stacked area plots (https://lightgbm.readthedocs.io/en/latest/_static/images/gcc-meetup-2.png) are really difficult to understand, and that this one should just be removed.

@StrikerRUS what do you think?

@StrikerRUS
Copy link
Collaborator

gcc Tips is @Laurae2's baby: #511, #945 (comment). Maybe he would like to comment or update this doc.

@StrikerRUS StrikerRUS requested a review from Laurae2 April 14, 2021 20:35
akshitadixit and others added 3 commits April 15, 2021 20:20
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
@@ -76,7 +76,7 @@ def __call__(self, preds, dataset):
elif argc == 3:
grad, hess = self.func(labels, preds, dataset.get_group())
else:
raise TypeError("Self-defined objective function should have 2 or 3 arguments, got %d" % argc)
raise TypeError(f"Self-defined objective function should have 2 or 3 arguments, got {argc}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please remove these unrelated changes from this PR? I think they were meant for #4181.

On whichever branch you use (based on my recommendation in #4181), you can remove them with a command like git reset --soft HEAD~1 followed by a force push.

Let me know if you get stuck!

@akshitadixit
Copy link
Contributor Author

What a relief to know I am not the only person who was confused after seeing the page. I almost gave up on the PR afraid to pull naive alt texts to such a project. I read your suggestions and realized what I misinterpreted. Thank you!

@jameslamb
Copy link
Collaborator

What a relief to know I am not the only person who was confused after seeing the page. I almost gave up on the PR afraid to pull naive alt texts to such a project. I read your suggestions and realized what I misinterpreted. Thank you!

Yes, sorry about that! I think that page could use some work. Thanks for pushing through it! Without your PR we probably would have not noticed that it needed some next explanatory text.

@jameslamb
Copy link
Collaborator

ok @akshitadixit I have an update for you! I talked to @Laurae2 in another chat about this. Copying those comments below:

  • first pic = with different depth hyperparameter values and different number of threads, the difference between using -O2 -mtune=core2, -O2 -mtune=native, -O3 -mtune=native, and -O3 -fast-math -mtune=native is negligible, although -mtune=native is slightly faster (+2%)
  • second pic = same as first pic (smaller bar = faster, it is cumulated time)
  • third pic = -O2 -mtune=core2 mean time is larger than the others (hence slower), -O3 -mtune=native is the fastest
  • fourth pic = using -O2 -mtune=core2 as the baseline, all 3 other options are faster, with -O3 -mtune=native being the fastest
  • fifth pic = same as fourth pic, but chart is grouped by compiler set of options instead of depth
  • sixth pic = overall all performed tests, how much cumulated time (in percentage) you would save by using which compiler set of options
  • seventh pic = against overall possible time saved, how much each compiler set of options will save you in percentage

the pics can be deleted since the most important is to tell gcc users to use -O3 -mtune=native and link to the experiment (the pics are only the details to not have to sift through 100+ slides, if really need a pic then 5th pic is best to keep

So given that, could you please change this pull request to remove all of the images EXCEPT for gcc-comparison-2.png?

Sorry that you spent time on them and we're going to delete them but know that we wouldn't have made this change unless you brought it up! So this improvement of the docs is thanks to your efforts.

@akshitadixit
Copy link
Contributor Author

Closing this to fix all of the mess I created 😅

@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.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] Add alt text on images
3 participants