-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
2447 cache Linux (apt
) dependencies in CI
#2923
2447 cache Linux (apt
) dependencies in CI
#2923
Conversation
Signed-off-by: Deepesha Burse <deepesha.3007@gmail.com>
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## develop #2923 +/- ##
========================================
Coverage 99.71% 99.71%
========================================
Files 245 245
Lines 18705 18705
========================================
Hits 18651 18651
Misses 54 54 ☔ View full report in Codecov by Sentry. |
We could also look into caching entire pip installations as well and their related directories, but I am not doing this for now may cause issues when updating Python versions or with dependencies that need post-install configuration steps (relevant discussion on actions/setup-python#330) |
How do we know if this is working? |
We will need to compare the runtime for the step Edit: a cache of 224 MB was generated which seems to be in line with the usual size of |
The Edit: on another run, the |
This reverts commit 5051bda.
Since we are moving to a new release schedule in pybamm-team#2881. Caches once written will get dumped in seven days anyway and therefore get invalidated, so there might be no need for them here.
`setup-python@v4` invalidates the cache every week, so this is irrelevant
since it offers no real benefit (all our dependencie are installed in `tox` environments).
@Saransh-cpp installing Using the cache now manages to shave off 7-8 minutes when installing Linux dependencies, which is a significant boost (8-9 minutes comes down to 1.5 minutes). Assuming that the error is related to caching Anyhow; as reported by most |
OpenBLAS cannot be found by `install_KLU_sundials.py`
Remove cache from benchmarks
I started working on this once more today since the issues with
So this PR adds (i) a very minute speedup for macOS ( |
Added in error earlier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome, thanks for the detailed research on this, @agriyakhetarpal!
I went through the explanation above and it looks like you've sorted the Linux dependencies. We can skip the MacOS and Windows caching part for now (until there is a native GH Actions solution or a working third-party solution). We can also skip caching Python packages as the workflow currently only caches the wheel file.
Some very minor comments below -
Co-Authored-By: Saransh Chopra <saransh0701@gmail.com>
apt
) dependencies in CI
Thanks for the review! For Pythonic dependencies, we do have another solution via caching the entire Python virtual environment that I had shared earlier in the discussion (this blog) and since |
Description
Caches dependencies for faster installation and setup of PyBaMM's dependencies via the
apt
package manager on LinuxFixes #2447
Fixes #2632
Tasks
Cache(pip
dependenciessetup-python
andactions/cache
do not provide any benefits since most of our dependencies are installed withinTox
environments)apt
dependencies (partially done)brew
dependencies (unhelpful)Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ pre-commit run
(see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
$ python run-tests.py --doctest
You can run unit and doctests together at once, using
$ python run-tests.py --quick
.Further checks: