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 GitHub workflow for continuous benchmarking. #304

Merged
merged 5 commits into from
May 30, 2024

Conversation

plietar
Copy link
Member

@plietar plietar commented May 15, 2024

The workflow runs on-demand by commenting /benchmark on any pull request. It runs a few iterations of both the base branch and the PR and posts the results back to the pull request as a comment. Additionally, detailed plots are available as images in the workflow artifacts. Unfortunately GitHub doesn't have a way for actions to upload images in comments.

At the moment the workflow runs two benchmarks, one at a 10k population size and 10k time steps, and second one at 1M population size and 1k time steps.

The workflow currently takes on the order of 1 hour to run. We can easily tweak the set of benchmarks in the future if we want to run more scenarios, or conversely if we want to reduce the total time.

There is no long-term tracking of benchmark results yet. Doing so is tricky as the performance of the underlying CI is unlikely to be stable long-term.

@plietar plietar changed the base branch from master to dev May 15, 2024 13:27
@plietar plietar changed the base branch from dev to dqrng-release May 15, 2024 14:18
@plietar plietar changed the base branch from dqrng-release to continuous-benchmarking-base May 15, 2024 14:26
@plietar plietar force-pushed the continuous-benchmarking-base branch from 0397412 to dfc943f Compare May 15, 2024 15:19
@plietar plietar mentioned this pull request May 17, 2024
@plietar plietar force-pushed the continuous-benchmarking branch 2 times, most recently from 19a04fc to 3fd40f1 Compare May 21, 2024 17:04
@plietar plietar changed the base branch from continuous-benchmarking-base to master May 21, 2024 17:04
@plietar plietar marked this pull request as ready for review May 21, 2024 17:04
@plietar plietar changed the title Continuous benchmarking Add GitHub workflow for continuous benchmarking. May 21, 2024
@plietar
Copy link
Member Author

plietar commented May 21, 2024

See plietar#9 for an example interaction. The link at the end of the bot's comment points to more detailed plots.

The workflow file needs to be merged into master, since that is what GitHub looks for to react to PR comments, which is why this PR targets that branch.

(Coincidentally I forgot I had that other performance improvement branch lying around that I should probably open a real PR for, since the numbers on it look pretty good...)

@plietar
Copy link
Member Author

plietar commented May 22, 2024

Unfortunately it seems the master branch doesn't build anymore since the latest release to dqrng, which is why CI is now failing. We need to cherry-pick some of the fixes I've made on the dev branch onto master. Will make a separate PR for that.

PR #311

The workflow runs on-demand by commenting `/benchmark` on any pull
request. It runs a few iterations of both the base branch and the PR and
posts the results back to the pull request as a comment. Additionally,
detailed plots are available as images in the workflow artifacts.
Unfortunately GitHub doesn't have a way for actions to upload images in
comments.

At the moment the workflow runs two benchmarks, one at a 10k population
size and 10k time steps, and second one at 1M population size and 1k
time steps.

The workflow currently takes on the order of 1 hour to run. We can
easily tweak the set of benchmarks in the future if we want to run more
scenarios, or conversly if we want to reduce the total time.

There is no long-term tracking of benchmark results yet. Doing so is
tricky as the performance of the underlying CI is unlikely to be stable
long-term.
It was merged into touchstone upstream.
I'm getting issues with 24.04 where pak installs some system packages
with apt-get, some system services are upgraded and restarted and the CI
runner is canceled. Not sure what the reason is, but 22.04 doesn't have
this problem.
Copy link
Member

@pwinskill pwinskill left a comment

Choose a reason for hiding this comment

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

Thanks so much @plietar! This looks like a really neat solution.
At some point I will sit down with others in the group and work out a sensible (resonably minimal) set of runs that we might want to benchmark against.

Copy link
Member

@giovannic giovannic left a comment

Choose a reason for hiding this comment

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

V cool!

@giovannic
Copy link
Member

Is this good to go? I would really like this for #300

@plietar plietar merged commit e598c66 into master May 30, 2024
4 checks passed
plietar added a commit that referenced this pull request May 30, 2024
Add GitHub workflow for continuous benchmarking.
@plietar
Copy link
Member Author

plietar commented May 30, 2024

Yes! Sorry I'd gotten sidetracked on some other stuff.

I've manually cherry-picked and pushed the changes onto the dev branch. You'll need to rebase your PR onto that (the PR branch needs the touchstone directory), after which the / benchmark should work!

@giovannic giovannic deleted the continuous-benchmarking branch June 3, 2024 10:01
@giovannic giovannic mentioned this pull request Sep 11, 2024
Merged
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