-
Notifications
You must be signed in to change notification settings - Fork 46
Cache generated matlab references #260
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
Merged
waltsims
merged 34 commits into
master
from
feature/cache-matlab-references-between-runs
Jan 16, 2024
Merged
Cache generated matlab references #260
waltsims
merged 34 commits into
master
from
feature/cache-matlab-references-between-runs
Jan 16, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
….com:waltsims/k-wave-python into feature/cache-matlab-references-between-runs
waltsims
reviewed
Jan 16, 2024
Owner
|
Please see #264 for my suggested changes.
I don't know how indicative these numbers are, but the workflow file is simpler. |
Collaborator
Author
Agree, they are not proper performance benchmarks. I just wanted to demonstrate the speed up based on the reported run times in Github. I used only a single test run for each row. |
waltsims
approved these changes
Jan 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #259
Adds caching support for the generated matlab references. This will allow us to avoid re-generating the reference files in every test run -- speed up our tests, improve developer experience and reduce Github's energy bill :)
Introduced logic is simple: if there is no change in the matlab reference generation files, pull previously generated files (if they exist). I also changing data sharing logic between Github Action-Jobs. Previously, we used
artifactsto share the data. Now we are using thecachedirectly. Cache functionality is faster compared toartifactsfrom what I observed.Some numbers:
^ here first and second scenarios are similar because we generate the reference files in both of them. Latter is faster due to usage of
cacheto share data between jobs.^^ when there is cache-hit,
pytestruns start significantly quicker than first two scenarios. This means you can start reading test logs faster than before.Future improvement: Use file-level caching. Currently, if any of the matlab reference generation files get updated, all references will be re-generated. In the future, we can work towards having more fine-grained caching.