-
Notifications
You must be signed in to change notification settings - Fork 26
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
Higher splitting for Github Actions and Cache venv #1213
Merged
Merged
Changes from 60 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
6833203
making changes to yaml and dev-requirements.txt
rahulgaur104 77249ad
adding -n auto to the rest of the yml files
rahulgaur104 8b629d3
increase splitting
YigitElma f13d157
try to cache pip dependencies
YigitElma 602cfd7
small fix
YigitElma 0b72272
use cached env for tests
YigitElma d2aa717
try to fix
YigitElma 7410101
fix the typo
YigitElma c655ae5
only use cached files
YigitElma 96ff396
fix
YigitElma c41867d
switch back to cache
YigitElma 886a7c3
try venv strategy
YigitElma b9cb7d8
run pytonpip.yml for once
YigitElma f3ca1b6
delete the redundant lines
YigitElma 8df6657
update
YigitElma e12fdce
try smth
YigitElma 1ddd718
try new restore for black/linting and regression tests
YigitElma ae8d854
Merge branch 'master' into rg/parallel-testing
YigitElma 4927894
fix
YigitElma bf158a0
add restore to rest of the workflows
YigitElma 77d2cea
change frequency of caching
YigitElma e84ffab
fix source thing
YigitElma f75a08f
Merge branch 'master' into rg/parallel-testing
YigitElma 199a14d
Merge remote-tracking branch 'origin' into rg/parallel-testing
YigitElma 368058e
don't use venv for lintin, for some reason it is 6 minutes slower
YigitElma de409c9
Merge branch 'master' into rg/parallel-testing
YigitElma 7058bf9
Merge branch 'master' into rg/parallel-testing
YigitElma ba5334a
update the hash of the cache to have requirements.txt to account for …
YigitElma 52cb5af
to rerun the tests
YigitElma 008036d
change cache workflow to save
YigitElma c76a5e5
add delete old cache files
YigitElma ac9024c
add delete old cache files
YigitElma af9af47
add delete old cache files
YigitElma 49a7ff8
add delete old cache files
YigitElma 7d68c2b
add delete old cache files
YigitElma c42e16b
try * for unknown cache
YigitElma bfa3448
try for unknown cache
YigitElma cf85a3b
split regression 6, notebook tests to 4 parts, remove redundant prints
YigitElma feec422
try splitting benchmarks
YigitElma 8314f2d
re distribute splitting
YigitElma f8bfd3b
something broke cache use, try to revert
YigitElma f8600b5
remove extra run for caching
YigitElma eec95c3
try 1
YigitElma 56128e2
try 2
YigitElma f4f7474
make a single hash for the cache name, re write caches
YigitElma dfdb291
try 3
YigitElma 168777f
add dummy test
YigitElma 4c54962
add dummy test
YigitElma c00781d
add dummy test
YigitElma 03d1c6f
add dummy test
YigitElma d309419
add dummy test
YigitElma 1af7453
add dummy test
YigitElma bbc655b
add dummy test
YigitElma c4fe39c
remove dummy test
YigitElma eaf110f
test
YigitElma 5066874
remove python 3.8 from weekly tests, we stoped using it 3 months ago
YigitElma 8b480b5
re run tests
YigitElma 94e9f3a
Merge branch 'master' into rg/parallel-testing
YigitElma 4a73d3a
update benchmarks to work with splitting
YigitElma 1cc625b
Merge branch 'master' into rg/parallel-testing
YigitElma b4e5060
make workflow file names consistent and more descriptive, use specifi…
YigitElma 0429433
Merge branch 'rg/parallel-testing' of github.com:PlasmaControl/DESC i…
YigitElma 7318805
add pip list
YigitElma e7e040b
Merge branch 'master' into rg/parallel-testing
dpanici 9a7a222
Merge branch 'master' into rg/parallel-testing
YigitElma d14ef72
Merge branch 'master' into rg/parallel-testing
YigitElma 6ce96e0
Merge branch 'master' into rg/parallel-testing
YigitElma 76dad87
Merge branch 'master' into rg/parallel-testing
YigitElma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
YigitElma marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Cache dependencies | ||
# This workflow is triggered every 2 days and updates the Python | ||
# and pip dependencies cache | ||
on: | ||
schedule: | ||
- cron: '30 4 */2 * *' # This triggers the workflow at 4:30 AM every 2 days | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
strategy: | ||
matrix: | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Delete old cached file with same python version | ||
run: | | ||
echo "Current Cached files list" | ||
gh cache list | ||
echo "Deleting cached files with pattern: ${{ runner.os }}-venv-${{ matrix.python-version }}-" | ||
for cache_key in $(gh cache list --json key -q ".[] | select(.key | startswith(\"${{ runner.os }}-venv-${{ matrix.python-version }}-\")) | .key"); do | ||
echo "Deleting cache with key: $cache_key" | ||
gh cache delete "$cache_key" | ||
done | ||
|
||
- name: Set up virtual environment | ||
run: | | ||
python -m venv .venv-${{ matrix.python-version }} | ||
source .venv-${{ matrix.python-version }}/bin/activate | ||
python -m pip install --upgrade pip | ||
pip install -r devtools/dev-requirements.txt | ||
|
||
- name: Cache Python environment | ||
id: cache-env | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv-${{ matrix.python-version }} | ||
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('devtools/dev-requirements.txt', 'requirements.txt') }} | ||
|
||
- name: Verify virtual environment activation | ||
run: | | ||
source .venv-${{ matrix.python-version }}/bin/activate | ||
python --version | ||
pip --version | ||
YigitElma marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,8 @@ jobs: | |
regression_tests: | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
strategy: | ||
matrix: | ||
python-version: ['3.10'] | ||
|
@@ -29,20 +31,34 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
|
||
- name: Restore Python environment cache | ||
id: restore-env | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: .venv-${{ matrix.python-version }} | ||
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('devtools/dev-requirements.txt', 'requirements.txt') }} | ||
|
||
- name: Set up virtual environment if not restored from cache | ||
if: steps.restore-env.outputs.cache-hit != 'true' | ||
run: | | ||
gh cache list | ||
python -m venv .venv-${{ matrix.python-version }} | ||
source .venv-${{ matrix.python-version }}/bin/activate | ||
python -m pip install --upgrade pip | ||
pip install -r devtools/dev-requirements.txt | ||
pip install matplotlib==3.7.2 | ||
YigitElma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Set Swap Space | ||
uses: pierotofy/set-swap-space@master | ||
with: | ||
swap-size-gb: 10 | ||
|
||
- name: Test with pytest | ||
run: | | ||
source .venv-${{ matrix.python-version }}/bin/activate | ||
pwd | ||
lscpu | ||
python -m pytest -v -m regression \ | ||
python -m pytest -v -m regression\ | ||
--durations=0 \ | ||
--cov-report xml:cov.xml \ | ||
--cov-config=setup.cfg \ | ||
|
@@ -54,6 +70,7 @@ jobs: | |
--group ${{ matrix.group }} \ | ||
--splitting-algorithm least_duration \ | ||
--db ./prof.db | ||
|
||
- name: save coverage file and plot comparison results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -63,6 +80,7 @@ jobs: | |
./cov.xml | ||
./mpl_results.html | ||
./prof.db | ||
|
||
- name: Upload coverage | ||
id : codecov | ||
uses: Wandalen/[email protected] | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
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.
im not sure if we want to split the benchmarks, since they need to run on the same hardware for it to be a meaningful comparison
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.
When we split master and latest PR still runs on the same hardware. The only difference is some portion of the benchmarks runs on the second job. I am assuming pytest-split always splits the same tests. SO, compile and jac tests may run on different hardware but the same test for aster and PR runs on the same job and thus hardware