CI: non-remote GH Actions now use a python venv#16789
Merged
gante merged 3 commits intohuggingface:mainfrom Apr 18, 2022
Merged
CI: non-remote GH Actions now use a python venv#16789gante merged 3 commits intohuggingface:mainfrom
gante merged 3 commits intohuggingface:mainfrom
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
Contributor
Author
|
(cc @ydshieh ) |
sgugger
approved these changes
Apr 14, 2022
Collaborator
sgugger
left a comment
There was a problem hiding this comment.
LGTM, thanks a lot for diving into this!
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
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.
What does this PR do?
This PR changes the cached python environment in non-remote GH actions to fresh virtual environments, that are rebuilt whenever
setup.pygets updated. This ensures our test environment is closer to what a new user would see in the wild, and that we don't have package constraints due to other installed libraries (that come bundled inubuntu-latest).As a side effect, because the cached venv requires no installation of python packages on a cache hit, we also got slightly faster CI:
Add new model like template testsModel templates runner(total of ~7 mins per full CI run when there is a cache hit)
Examples of runs:
cache miss -> create new venv: https://github.com/huggingface/transformers/runs/6027339356?check_suite_focus=true
cache hit -> load cached venv: https://github.com/huggingface/transformers/runs/6028381114?check_suite_focus=true