Skip to content
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

update workflow for individual test #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/slow_tests_internal_gaudi2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: QA Model Validation

on:
pull_request_review:
types: [submitted]
workflow_dispatch:
inputs:
selected_option:
type: choice
description: 'Select one of the following options'
required: true
default: 'fast-test'
options:
- qa
- glue
- clm
- summarization
- mlm
- image_classification
- audio_classification
- speech_recognition_ctc
- seq2seq_qa
- clip
- bridgetower
- lora_clm
- speech_recognition_seq2seq

jobs:
qa_validation:
name: QA Model Validation
if: github.event.review.state == 'approved' || github.event_name == 'workflow_dispatch'
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Pull Docker image
run: docker pull vault.habana.ai/gaudi-docker/1.15.0/ubuntu22.04/habanalabs/pytorch-installer-2.2.0:latest

- name: Run tests
run: |
echo "Selected option: ${{ github.event.inputs.selected_option }}"
docker run \
-v $PWD:/root/workspace \
--workdir=/root/workspace \
--runtime=habana \
-e HABANA_VISIBLE_DEVICES=all \
-e OMPI_MCA_btl_vader_single_copy_mechanism=none \
-e GAUDI2_CI=1 \
--cap-add=sys_nice \
--net=host \
--ipc=host \
vault.habana.ai/gaudi-docker/1.15.0/ubuntu22.04/habanalabs/pytorch-installer-2.2.0:latest \
bash tests/ci/model_tests.sh ${{ github.event.inputs.selected_option }}
53 changes: 53 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,59 @@ slow_tests_fsdp: test_installs
example_diff_tests: test_installs
python -m pytest tests/test_examples_match_transformers.py

# Run question-ansering test
slow_tests_question_answering_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "run_qa"

# Run sequence-classification glue test
slow_tests_glue_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "run_glue"

# Run language-modeling clm test
slow_tests_clm_example: test_installs
python -m pip install git+https://github.com/HabanaAI/[email protected]
python -m pytest tests/test_examples.py -v -s -k "run_clm"

# Run summarization test
slow_tests_summarization_example: test_installs
python -m pip install git+https://github.com/HabanaAI/[email protected]
python -m pytest tests/test_examples.py -v -s -k "run_summarization"

# Run image-classification test
slow_tests_image_classification_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "run_image_classification"

# Run mlm test
slow_tests_question_answering_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "run_mlm"

# Run audio-classification test
slow_tests_audio_classification_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "run_audio_classification"

# Run run_speech_recognition_ctc test
slow_speech_recognition_ctc_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "run_speech_recognition_ctc"

# Run run_seq2seq_qa test
slow_tests_seq2seq_qa_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "run_seq2seq_qa"

# Run clip test
slow_tests_clip_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "run_clip"

# Run run_bridgetower test
slow_tests_bridgetower_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "run_bridgetower"

# Run run_lora_clm test
slow_tests_lora_clm_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "lora_clm"

# Run run_speech_recognition_seq2seq test
slow_tests_speech_recognition_seq2seq_example: test_installs
python -m pytest tests/test_examples.py -v -s -k "run_speech_recognition_seq2seq"
# Utilities to release to PyPi
build_dist_install_tools:
python -m pip install build
Expand Down
10 changes: 10 additions & 0 deletions tests/ci/model_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

if [ $# -ne 1 ]; then
echo "Usage: $0 <argument>"
exit 1
fi

python -m pip install --upgrade pip
export RUN_SLOW=true
make slow_tests_"$1"_example
Loading