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

Try out caching pip #2107

Closed
wants to merge 13 commits into from
Closed

Try out caching pip #2107

wants to merge 13 commits into from

Conversation

lajohn4747
Copy link
Contributor

@lajohn4747 lajohn4747 commented Jul 3, 2024

part of #2015
Longest minimum test (3.11, windows-latest)- 17m 10s went down to 14m 41s

Comment on lines 40 to 41
- name: Install dependencies
run: |
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use the cache to determine how to install dependencies:

Suggested change
- name: Install dependencies
run: |
- name: Install SDV (cache has not changed)
if: steps.cache-pip.outputs.cache-hit == 'true'
run: |
python -m pip install --no-dependencies .
- name: Install SDV and dependencies (cache has changed)
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cannot call the force command --no-dependencies, as that command ignores installing dependencies altogether (Job example).

Pip looks into the cache location path and will directly install those files rather than re-download them so we don't need to have separate steps. Example here: we can see it using the cache and cut down the time for windows installation by not downloading. (~2-3 mins saved)

@lajohn4747 lajohn4747 requested a review from gsheni July 10, 2024 18:01
@lajohn4747 lajohn4747 marked this pull request as ready for review July 10, 2024 18:02
@lajohn4747 lajohn4747 requested a review from a team as a code owner July 10, 2024 18:02
@lajohn4747
Copy link
Contributor Author

Appears to be minimal gain with caching and we have a limit to how much we can cache for tests. Closing without merging since the investigation results do not warrant the addition.

@lajohn4747 lajohn4747 closed this Jul 11, 2024
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.

2 participants