This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
update Python environment setup in GitHub Actions #5272
Merged
Merged
Conversation
This file contains 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
epwalsh
changed the title
update Python environment setup
update Python environment setup in GitHub Actions
Jun 18, 2021
jacob-morrison
approved these changes
Jun 18, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR makes some improvements to how we cache and initialize the Python environment within GitHub Actions jobs. In particular, we now
setup-python
action to avoid messing with system-wide files. Messing with system-wide files is okay for GitHub-hosted runners, but not for self-hosted runners.Another notable change proposed here is that we only run the "CPU Tests" job on the latest supported Python version. We still test to make sure we can properly install AllenNLP on all officially supported versions, but I don't think it's worth running all of our tests on different Python versions because it seems redundant and takes up build time and cache space. The only issues we've had between Python versions have had to do with either how the package is built or syntax, both of which are still checked by our "Test Install" job that runs on all supported Python versions. Cache space is limited to 5GiB I think, and any cache that includes a torch version with CUDA support takes up a sizeable portion of that (2.2GiB).