feat/fix github actions cache#403
Conversation
d4f5461 to
af06b52
Compare
af06b52 to
bcc0a18
Compare
|
How much is the decrease in runtime? |
well, I'm still experimenting...
|
7800ed8 to
0d3d36f
Compare
|
side note: pre-commit on CI seems to take 165s (see here) |
as this pr doesn't aim to change anything about pre-commit speeds, i only measure the .venv setup that comes before it. usually, setting up the .venv took about a minute, as shown here: with the changes proposed in this pr, this setup time goes down to about one second. now you might be wondering why both cicd runs took about two minutes forty for the pre-commit section. if we look closely, we can see that on one of the runs, mypy is a full minute slower than on the other. this is a separate issue that i am therefore addressing in #405. conclusion: i would commit the changes as proposed here, but maybe make one more change in the future: |
|
Thanks a lot for the detailed breakdown, I think this is convincing. But please distill a complete PR description from your comments (guiding questions: what/why/how changes and are there side effects). |
|
I have come to realise that some of these changes don't really make sense in the grand scheme of things. limiting the package install for our cicd pipeline to those packages that are needed technically makes sense. in an ideal world we would only need the cicd tools like prek and zuban and the stubs packages that allow zuban to typecheck everything. sadly however, not all packages supply stubs, and even more sadly it's the packages with the largest dependencies. this means that we still need to install all the torch and nvidia stuff, blowing up the cicd venv. (thanks nvidia and facebook...) so, because of these select few packages that are massive but required, we either spend lots of time on building a .venv, or lots of time on mypy building the same exact venv before it checks the code. so, we now have two choices:
regardless of what we choose, this pr won't bring a big improvement in speed as hoped... |
for every pre-commit run of our github actions, we rebuild the .venv, which takes long and consumes resources. this pr tries to address that with a mix of better caching and a more sensible choice of dependencies.
main result:
pre-commit runs are about a minute faster.
details:
--only-group cicd. this removes lots of large nvidia and torch libraries and speeds up the .venv creation by about a minute. (previously it was about a minute, now its about a second)