Skip to content

Commit

Permalink
use daily ci without sleep 10
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Sep 3, 2024
1 parent e6627d6 commit 3313d1b
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 77 deletions.
148 changes: 72 additions & 76 deletions .github/workflows/model_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ jobs:
working-directory: /transformers
run: |
ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist/42ce72ae70f7d34c14dbc3a856379a5d5b72de47/config.json
sleep 10
rm -rf /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist
- name: Check cache 9
Expand All @@ -205,7 +204,6 @@ jobs:
working-directory: /transformers
run: |
ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist/42ce72ae70f7d34c14dbc3a856379a5d5b72de47/config.json
sleep 10
rm -rf /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist/42ce72ae70f7d34c14dbc3a856379a5d5b72de47
- name: Check cache 9
Expand All @@ -218,7 +216,6 @@ jobs:
working-directory: /transformers
run: |
ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist/42ce72ae70f7d34c14dbc3a856379a5d5b72de47/config.json
sleep 10
rm -rf /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist/42ce72ae70f7d34c14dbc3a856379a5d5b72de47/config.json
- name: Check cache 9
Expand Down Expand Up @@ -259,79 +256,78 @@ jobs:
- name: Check cache 9
working-directory: /transformers
run: |
sleep 10
tail -10 /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist/42ce72ae70f7d34c14dbc3a856379a5d5b72de47/config.json
- name: Check cache 9.5
working-directory: /transformers
run: |
apt-get install -y sudo
- name: Check cache 9.5 2
working-directory: /transformers
run: |
apt-get install sudo
- name: Check cache 10
working-directory: /transformers
run: |
sudo chown -R nobody:nogroup /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/
- name: Check cache 11
working-directory: /transformers
run: |
ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/
- name: Check cache 12
working-directory: /transformers
run: |
ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist
- name: Check cache 13
working-directory: /transformers
run: |
ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist/42ce72ae70f7d34c14dbc3a856379a5d5b72de47
- name: Check cache 14
working-directory: /transformers
run: |
ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist/42ce72ae70f7d34c14dbc3a856379a5d5b72de47/config.json
- name: check who I am
working-directory: /transformers
run: |
whoami
# - name: delete 1 cache
#
# - name: Check cache 9.5
# working-directory: /transformers
# run: |
# rm -rf /mnt/cache/hub/models--hf-internal-testing--config-no-model

- name: Run all tests on GPU
working-directory: /transformers
run: python3 -m pytest -rsfE -v --make-reports=${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports tests/${{ matrix.folders }}

- name: Failure short reports
if: ${{ failure() }}
continue-on-error: true
run: cat /transformers/reports/${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports/failures_short.txt

- name: Run test
shell: bash
run: |
mkdir -p /transformers/reports/${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports
echo "hello" > /transformers/reports/${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports/hello.txt
echo "${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports"
- name: Check cache 9
working-directory: /transformers
run: |
ls -l /mnt/cache/hub/models--BAAI--AltCLIP/snapshots/b989a7bc9f73809acc4df8265e63174c74791ba6/pytorch_model.bin
- name: "Test suite reports artifacts: ${{ inputs.machine_type }}_run_models_gpu_${{ env.matrix_folders }}_test_reports"
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.machine_type }}_run_models_gpu_${{ env.matrix_folders }}_test_reports
path: /transformers/reports/${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports

# apt-get install -y sudo
#
# - name: Check cache 9.5 2
# working-directory: /transformers
# run: |
# apt-get install sudo
#
# - name: Check cache 10
# working-directory: /transformers
# run: |
# sudo chown -R nobody:nogroup /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/
#
# - name: Check cache 11
# working-directory: /transformers
# run: |
# ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/
#
# - name: Check cache 12
# working-directory: /transformers
# run: |
# ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist
#
# - name: Check cache 13
# working-directory: /transformers
# run: |
# ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist/42ce72ae70f7d34c14dbc3a856379a5d5b72de47
#
# - name: Check cache 14
# working-directory: /transformers
# run: |
# ls -l /mnt/cache/hub/models--hf-internal-testing--no-config-test-repo/.no_exist/42ce72ae70f7d34c14dbc3a856379a5d5b72de47/config.json
#
# - name: check who I am
# working-directory: /transformers
# run: |
# whoami
#
## - name: delete 1 cache
## working-directory: /transformers
## run: |
## rm -rf /mnt/cache/hub/models--hf-internal-testing--config-no-model
#
# - name: Run all tests on GPU
# working-directory: /transformers
# run: python3 -m pytest -rsfE -v --make-reports=${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports tests/${{ matrix.folders }}
#
# - name: Failure short reports
# if: ${{ failure() }}
# continue-on-error: true
# run: cat /transformers/reports/${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports/failures_short.txt
#
# - name: Run test
# shell: bash
# run: |
# mkdir -p /transformers/reports/${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports
# echo "hello" > /transformers/reports/${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports/hello.txt
# echo "${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports"
#
# - name: Check cache 9
# working-directory: /transformers
# run: |
# ls -l /mnt/cache/hub/models--BAAI--AltCLIP/snapshots/b989a7bc9f73809acc4df8265e63174c74791ba6/pytorch_model.bin
#
# - name: "Test suite reports artifacts: ${{ inputs.machine_type }}_run_models_gpu_${{ env.matrix_folders }}_test_reports"
# if: ${{ always() }}
# uses: actions/upload-artifact@v4
# with:
# name: ${{ inputs.machine_type }}_run_models_gpu_${{ env.matrix_folders }}_test_reports
# path: /transformers/reports/${{ inputs.machine_type }}_run_models_gpu_${{ matrix.folders }}_test_reports
#
2 changes: 1 addition & 1 deletion .github/workflows/self-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
name: Setup
strategy:
matrix:
machine_type: [aws-g4dn-2xlarge-cache]
machine_type: [daily-ci]
runs-on:
group: '${{ matrix.machine_type }}'
container:
Expand Down

0 comments on commit 3313d1b

Please sign in to comment.