-
-
Notifications
You must be signed in to change notification settings - Fork 654
[ci] use actions/cache@v2 for caching #1455
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
Conversation
@ydcjeff thanks for the PR ! If we would like to use cache, it is better to use it for all github actions:
Let's start with unit-tests.yml. I'd prefer to have a single step with caching conda and pip folders and cache key depending on the year and week number: Btw, I'm wondering what is the tool you use for formatting yml, e.g. replacing quotes, indents etc ? I have no strong opinion on formatting those things. However, it is better to keep a single format for all. Let's keep the format as it is for this PR and maybe we can change it later in another PR. |
Ahhh yes caching with date is a good idea, will play around it. ouch i forgot to add in some github actions. EDIT: we can do yaml format with pre-commit |
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.
Thanks for the update @ydcjeff ! I inspected a bit the logs and looks like there is an issue with pip cache dir fetching.
@ydcjeff I wonder also how can we check if it works actually : can use the cache ? |
To see if it works is pip install is using cached instead of downloading... |
@ydcjeff yes, looks like actions/cache downloaded and reused cache (https://github.com/pytorch/ignite/pull/1455/checks#step:6:19), but "Install dependencies" step looks wrong: https://github.com/pytorch/ignite/pull/1455/checks#step:7:24. I'd expect that we do not need to reinstall torch, vision and other deps. Could you please take a deeper look? Thanks |
@vfdev-5 I see but how shall we handle if there is a new requirement for testing? |
@ydcjeff we can dump
Sounds good |
@vfdev-5 seems like at least we need to install deps from cache or do you know any other way? |
@ydcjeff thanks a lot for working on that ! Let me check that in more details and we can decide on what can be done. |
@ydcjeff there are several approaches to use cache with setup-miniconda actions. In all the cases we have to run
@ydcjeff maybe your approach (1) is what we can take here. However, I prefer to follow this guide : https://github.com/conda-incubator/setup-miniconda#caching : cache action is done before
for all OS. |
@vfdev-5 Thank you for your comment. I will checkout from this branch and play around in my forked repo. |
This one :) @vfdev-5 |
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.
Thanks for the updates @ydcjeff
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.
Thanks a lot @ydcjeff for the PR and appologies for the time it took to merge it !
@ydcjeff could you please fix the conflicts due to the new yml style |
I'm on it. |
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.
Thanks for the update !
Actually, I checked how cache is used for windows and seems like there is something missing:
- https://github.com/pytorch/ignite/runs/1491964022#step:7:56
and compare with for example macosx - https://github.com/pytorch/ignite/runs/1491964045#step:7:55
@ydcjeff thanks ! |
Fixes #1403
Description: use actions/cache@v2 for caching
Check list: