-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate new cache system for training (#472)
* Integrate new cache system for training * ci: reduce export and pipelines test frequency This runs export and pipelines tests in dedicated pipelines with stricter path filters to avoid running them on every change. --------- Co-authored-by: David Corvoysier <[email protected]>
- Loading branch information
1 parent
1b477ba
commit d319856
Showing
20 changed files
with
370 additions
and
224 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Optimum neuron / Test INF1 full export | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- "optimum/exporters/neuron/*.py" | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- "optimum/exporters/neuron/*.py" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
do-the-job: | ||
name: Run INF1 full export tests | ||
runs-on: [self-hosted, 4-aws-inf1, 24-cpu, ci] | ||
env: | ||
AWS_REGION: us-east-1 | ||
steps: | ||
- name: Check AMI | ||
run: dpkg -l | grep neuron | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install system packages | ||
run: | | ||
sudo apt install python3.8-venv -y | ||
- name: Install python packages | ||
run: | | ||
python3 -m venv aws_neuron_venv_pytorch | ||
source aws_neuron_venv_pytorch/bin/activate | ||
python -m pip install -U pip | ||
python -m pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com | ||
python -m pip install .[neuron,tests] | ||
python -m pip uninstall optimum -y | ||
python -m pip install optimum | ||
- name: Run CLI tests | ||
run: | | ||
source aws_neuron_venv_pytorch/bin/activate | ||
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest -m is_inferentia_test tests/cli | ||
- name: Run export tests | ||
run: | | ||
source aws_neuron_venv_pytorch/bin/activate | ||
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest -m is_inferentia_test tests/exporters |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Optimum neuron / Test INF1 pipelines | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- "optimum/neuron/pipelines/**.py" | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- "optimum/neuron/pipelines/**.py" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
do-the-job: | ||
name: Run INF1 tests | ||
runs-on: [self-hosted, 4-aws-inf1, 24-cpu, ci] | ||
env: | ||
AWS_REGION: us-east-1 | ||
steps: | ||
- name: Check AMI | ||
run: dpkg -l | grep neuron | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install system packages | ||
run: | | ||
sudo apt install python3.8-venv -y | ||
- name: Install python packages | ||
run: | | ||
python3 -m venv aws_neuron_venv_pytorch | ||
source aws_neuron_venv_pytorch/bin/activate | ||
python -m pip install -U pip | ||
python -m pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com | ||
python -m pip install .[neuron,tests] | ||
python -m pip uninstall optimum -y | ||
python -m pip install optimum | ||
- name: Run pipelines tests | ||
run: | | ||
source aws_neuron_venv_pytorch/bin/activate | ||
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest -m is_inferentia_test tests/pipelines |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Optimum neuron / Test INF2 full export | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- "optimum/exporters/neuron/*.py" | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- "optimum/exporters/neuron/*.py" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
do-the-job: | ||
name: Run INF2 full export tests | ||
runs-on: [self-hosted, 1-aws-inf2, 32-cpu, ci] # run the job on the newly created runner | ||
env: | ||
AWS_REGION: us-east-1 | ||
steps: | ||
- name: Check AMI | ||
run: dpkg -l | grep neuron | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install python dependencies | ||
run: | | ||
sudo apt install python3.8-venv -y | ||
python3 -m venv aws_neuron_venv_pytorch | ||
source aws_neuron_venv_pytorch/bin/activate | ||
python -m pip install -U pip | ||
python -m pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com | ||
python -m pip install .[neuronx,tests] | ||
- name: Run exporters tests | ||
run: | | ||
source aws_neuron_venv_pytorch/bin/activate | ||
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest -m is_inferentia_test tests/exporters |
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 |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
|
||
include README.md | ||
include LICENSE | ||
include optimum/neuron/utils/neuron_cc_wrapper |
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
Oops, something went wrong.