-
Notifications
You must be signed in to change notification settings - Fork 28.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from huggingface/update
Update
- Loading branch information
Showing
1,347 changed files
with
47,152 additions
and
13,386 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
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,102 @@ | ||
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 | ||
|
||
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: | ||
model_job: | ||
name: " " | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
folders: ${{ fromJson(inputs.folder_slices)[inputs.slice_id] }} | ||
runs-on: ['${{ inputs.machine_type }}', nvidia-gpu, t4, daily-ci] | ||
container: | ||
image: huggingface/transformers-all-latest-gpu | ||
options: --gpus all --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: NVIDIA-SMI | ||
run: | | ||
nvidia-smi | ||
- 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 -v --make-reports=${{ inputs.machine_type }}_tests_gpu_${{ matrix.folders }} tests/${{ matrix.folders }} | ||
|
||
- name: Failure short reports | ||
if: ${{ failure() }} | ||
continue-on-error: true | ||
run: cat /transformers/reports/${{ inputs.machine_type }}_tests_gpu_${{ matrix.folders }}/failures_short.txt | ||
|
||
- name: Run test | ||
shell: bash | ||
run: | | ||
mkdir -p /transformers/reports/${{ inputs.machine_type }}_tests_gpu_${{ matrix.folders }} | ||
echo "hello" > /transformers/reports/${{ inputs.machine_type }}_tests_gpu_${{ matrix.folders }}/hello.txt | ||
echo "${{ inputs.machine_type }}_tests_gpu_${{ matrix.folders }}" | ||
- name: "Test suite reports artifacts: ${{ inputs.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports" | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports | ||
path: /transformers/reports/${{ inputs.machine_type }}_tests_gpu_${{ matrix.folders }} |
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
Oops, something went wrong.