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

Update compile benchmark tutorial #1654

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Conversation

KumoLiu
Copy link
Contributor

@KumoLiu KumoLiu commented Feb 26, 2024

Fixes # .

Description

Revert logarithmic y axes plt in compile result show.

Checks

  • Avoid including large-size files in the PR.
  • Clean up long text outputs from code cells in the notebook.
  • For security purposes, please check the contents and remove any sensitive info such as user names and private key.
  • Ensure (1) hyperlinks and markdown anchors are working (2) use relative paths for tutorial repo files (3) put figure and graphs in the ./figure folder
  • Notebook runs automatically ./runner.sh -t <path to .ipynb file>

Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Feb 26, 2024

Hi @ericspod, following the suggestions you mentioned in this comment, I revised the graphs and substituted with logarithmic y-axes. However, after an offline discussion with @Nic-Ma, we're of the opinion that the use of logarithmic y-axes might introduce ambiguity in illustrating the speed enhancement of the actual compile relative to eager training. This could potentially lead users to overestimate the magnitude of the speed increase. What do you think?

@ericspod
Copy link
Member

Hi @KumoLiu, I see the concern with logarithmic y axis. My feeling is still that the graphs as they are don't convey the benchmark information well but I'm trying to figure out what would. I wonder if presenting the compiled values as a ratio of the baseline uncompiled times would help, especially in the right hand graph if you omit the first epoch or two which have those spikes. If you're both okay with this tutorial as it is we can come back to this some other time, the demonstration value of the notebook is good to have in the tutorials.

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Feb 27, 2024

I wonder if presenting the compiled values as a ratio of the baseline uncompiled times would help, especially in the right hand graph if you omit the first epoch or two which have those spikes.

Hi @ericspod, yes. If you're training a rather small model for a limited number of epochs, the compile feature may not significantly boost the speed. On the flip side, when it comes to larger scale training, the speedup gains from the compile feature tend to become more evident. I believe that detailing the execution times for the initial few epochs within the notebook would offer users insight into this behavioral pattern. What do you think?

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Feb 27, 2024

Alternatively, we can keep the graph of the logarithmic y axis as well.

@ericspod
Copy link
Member

I see why the initial epochs times can be relevant, however there's so much empty space in the graph and little separation between times. Again I'm fine with this change if you are. Thanks!

@KumoLiu KumoLiu marked this pull request as ready for review February 27, 2024 15:20
@KumoLiu KumoLiu requested review from ericspod and Nic-Ma February 27, 2024 15:24
@KumoLiu
Copy link
Contributor Author

KumoLiu commented Feb 28, 2024

Merged for now, and we can come back to this some other time when we find a better way.

@KumoLiu KumoLiu merged commit 5d561cb into Project-MONAI:main Feb 28, 2024
6 checks passed
@KumoLiu KumoLiu deleted the compile branch February 28, 2024 02:57
boneseva pushed a commit to boneseva/MONAI-tutorials that referenced this pull request Apr 21, 2024
Fixes # .

### Description
Revert logarithmic y axes plt in compile result show.

### Checks
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [ ] Avoid including large-size files in the PR.
- [ ] Clean up long text outputs from code cells in the notebook.
- [ ] For security purposes, please check the contents and remove any
sensitive info such as user names and private key.
- [ ] Ensure (1) hyperlinks and markdown anchors are working (2) use
relative paths for tutorial repo files (3) put figure and graphs in the
`./figure` folder
- [ ] Notebook runs automatically `./runner.sh -t <path to .ipynb file>`

Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants