-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Revive AMD scheduled CI #33448
Merged
Merged
Revive AMD scheduled CI #33448
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
29b115b
copied from self-scheduled-amd.yml
ydshieh 17c8926
step 0001
ydshieh 9717874
step 0002
ydshieh 21f70d6
temp
ydshieh 695886f
step 0003 - mi250
ydshieh 67dd36d
step 0004 - fix: need use inputs
ydshieh d6e98c0
step 0004 - fix: need use inputs
ydshieh 65ecb0e
step 0005 - torch pipeline
ydshieh b299d66
step 0006 - example
ydshieh fd39afb
step 0007 - Rocm and slack
ydshieh dc43f4f
step 0008 - update caller
ydshieh 19b5950
fix
ydshieh 0d577d6
trigger
ydshieh 041464b
step 0014 - copy to the original file
ydshieh 2b567a2
step 0015 - delete
ydshieh b2eb5e2
step 0016 - update caller
ydshieh 0f5b3d1
step 0017 - 210
ydshieh 8e7aef2
step 0018 - delete 300
ydshieh f290ef0
trigger example ci
ydshieh 351a702
step 0017 - 210
ydshieh af67ad7
step 0018 - revert
ydshieh aa8a415
step 0020 - branch name
ydshieh 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
name: model jobs | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
folder_slices: | ||
required: true | ||
type: string | ||
machine_type: | ||
required: true | ||
type: string | ||
slice_id: | ||
required: true | ||
type: number | ||
runner: | ||
required: true | ||
type: string | ||
docker: | ||
required: true | ||
type: string | ||
|
||
env: | ||
HF_HOME: /mnt/cache | ||
TRANSFORMERS_IS_CI: yes | ||
OMP_NUM_THREADS: 8 | ||
MKL_NUM_THREADS: 8 | ||
RUN_SLOW: yes | ||
# For gated repositories, we still need to agree to share information on the Hub repo. page in order to get access. | ||
# This token is created under the bot `hf-transformers-bot`. | ||
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }} | ||
SIGOPT_API_TOKEN: ${{ secrets.SIGOPT_API_TOKEN }} | ||
TF_FORCE_GPU_ALLOW_GROWTH: true | ||
RUN_PT_TF_CROSS_TESTS: 1 | ||
CUDA_VISIBLE_DEVICES: 0,1 | ||
|
||
jobs: | ||
run_models_gpu: | ||
name: " " | ||
strategy: | ||
max-parallel: 1 # For now, not to parallelize. Can change later if it works well. | ||
fail-fast: false | ||
matrix: | ||
folders: ${{ fromJson(inputs.folder_slices)[inputs.slice_id] }} | ||
runs-on: ['${{ inputs.machine_type }}', self-hosted, amd-gpu, '${{ inputs.runner }}'] | ||
container: | ||
image: ${{ inputs.docker }} | ||
options: --device /dev/kfd --device /dev/dri --env ROCR_VISIBLE_DEVICES --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/ | ||
steps: | ||
- name: Echo input and matrix info | ||
shell: bash | ||
run: | | ||
echo "${{ inputs.folder_slices }}" | ||
echo "${{ matrix.folders }}" | ||
echo "${{ toJson(fromJson(inputs.folder_slices)[inputs.slice_id]) }}" | ||
- name: Echo folder ${{ matrix.folders }} | ||
shell: bash | ||
# For folders like `models/bert`, set an env. var. (`matrix_folders`) to `models_bert`, which will be used to | ||
# set the artifact folder names (because the character `/` is not allowed). | ||
run: | | ||
echo "${{ matrix.folders }}" | ||
matrix_folders=${{ matrix.folders }} | ||
matrix_folders=${matrix_folders/'models/'/'models_'} | ||
echo "$matrix_folders" | ||
echo "matrix_folders=$matrix_folders" >> $GITHUB_ENV | ||
- name: Update clone | ||
working-directory: /transformers | ||
run: git fetch && git checkout ${{ github.sha }} | ||
|
||
- name: Reinstall transformers in edit mode (remove the one installed during docker image build) | ||
working-directory: /transformers | ||
run: python3 -m pip uninstall -y transformers && python3 -m pip install -e . | ||
|
||
- name: Update / Install some packages (for Past CI) | ||
if: ${{ contains(inputs.docker, '-past-') }} | ||
working-directory: /transformers | ||
run: | | ||
python3 -m pip install -U datasets | ||
- name: Update / Install some packages (for Past CI) | ||
if: ${{ contains(inputs.docker, '-past-') && contains(inputs.docker, '-pytorch-') }} | ||
working-directory: /transformers | ||
run: | | ||
python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate | ||
- name: ROCM-SMI | ||
run: | | ||
rocm-smi | ||
- name: ROCM-INFO | ||
run: | | ||
rocminfo | grep "Agent" -A 14 | ||
- name: Show ROCR environment | ||
run: | | ||
echo "ROCR: $ROCR_VISIBLE_DEVICES" | ||
- name: Environment | ||
working-directory: /transformers | ||
run: | | ||
python3 utils/print_env.py | ||
- name: Show installed libraries and their versions | ||
working-directory: /transformers | ||
run: pip freeze | ||
|
||
- 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 }} -m "not not_device_test" | ||
|
||
- 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: "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 |
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 was deleted.
Oops, something went wrong.
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.
@mht-sharma said we don't have such runner anymore