Skip to content

Commit

Permalink
[TF FE] Add TF Hugging Face model tests into nightly (openvinotoolkit…
Browse files Browse the repository at this point in the history
…#23095)

### Details:
 - Added Hugging Face models to nightly

### Tickets:
 - 132904

---------

Co-authored-by: Andrei Kashchikhin <[email protected]>
  • Loading branch information
popovaan and akashchi authored Feb 28, 2024
1 parent 96b72d0 commit a698628
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 306 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/job_tensorflow_models_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ on:
type: string
required: false
default: '{"image": null}'
event:
description: 'Event that triggered the workflow. E.g., "schedule" for nightly runs'
model_scope:
description: 'Scope of models for testing.'
type: string
required: true

jobs:
TensorFlow_Hub_Models_Tests:
name: TensorFlow Hub Models tests
timeout-minutes: ${{ inputs.event == 'schedule' && 400 || 25 }}
TensorFlow_Models_Tests:
name: TensorFlow Models tests
timeout-minutes: ${{ inputs.model_scope != 'precommit' && 400 || 25 }}
runs-on: ${{ inputs.runner }}
container: ${{ fromJSON(inputs.container) }}
defaults:
Expand Down Expand Up @@ -108,22 +108,21 @@ jobs:
python3 -m pip install ${INSTALL_DIR}/tools/openvino-*
python3 -m pip install ${INSTALL_DIR}/openvino_tokenizers-*
- name: Install TF Hub tests requirements
- name: Install TF Models tests requirements
run: python3 -m pip install -r ${MODEL_HUB_TESTS_INSTALL_DIR}/tensorflow/requirements.txt

- name: TensorFlow Models Tests - TF FE
run: |
export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/tensorflow/ -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-tf_hub_tf_fe.html --self-contained-html -v
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/tensorflow/ -m ${{ inputs.model_scope }} --html=${INSTALL_TEST_DIR}/TEST-tf_fe_models_${{ inputs.model_scope }}.html --self-contained-html -v
env:
TYPE: ${{ inputs.event == 'schedule' && 'nightly' || 'precommit'}}
TEST_DEVICE: CPU

- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: test-results-tensorflow-hub-models
name: test-results-tensorflow-models-${{ inputs.model_scope }}
path: |
${{ env.INSTALL_TEST_DIR }}/TEST*.html
if-no-files-found: 'error'
21 changes: 17 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -501,15 +501,28 @@ jobs:
# image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
# volumes:
# - /mount:/mount
TensorFlow_Models_Tests:
TensorFlow_Models_Tests_Precommit:
name: TensorFlow Models tests
if: fromJSON(needs.smart_ci.outputs.affected_components).TF_FE.test ||
fromJSON(needs.smart_ci.outputs.affected_components).TFL_FE.test
needs: [ Build, Smart_CI, Openvino_tokenizers ]
uses: ./.github/workflows/job_tensorflow_models_tests.yml
with:
runner: ${{ github.event_name == 'schedule' && 'ubuntu-20.04-16-cores' || 'ubuntu-20.04-8-cores' }}
event: ${{ github.event_name }}
runner: 'ubuntu-20.04-8-cores'
model_scope: 'precommit'

TensorFlow_Models_Tests_Nightly:
name: TensorFlow Models tests
if: ${{ github.event_name == 'schedule' }}
needs: [ Build, Smart_CI, Openvino_tokenizers ]
strategy:
max-parallel: 2
matrix:
MODEL_SCOPE: ['nightly_hf', 'nightly_tf_hub']
uses: ./.github/workflows/job_tensorflow_models_tests.yml
with:
runner: 'ubuntu-20.04-16-cores'
model_scope: ${{ matrix.MODEL_SCOPE }}

# TODO: Switch back to self-hosted runners
# container:
Expand Down Expand Up @@ -755,7 +768,7 @@ jobs:
Overall_Status:
name: ci/gha_overall_status
needs: [Smart_CI, Build, Debian_Packages, Samples, Conformance, ONNX_Runtime, CXX_Unit_Tests, Python_Unit_Tests,
CPU_Functional_Tests, TensorFlow_Models_Tests, PyTorch_Models_Tests, NVIDIA_Plugin, Openvino_tokenizers]
CPU_Functional_Tests, TensorFlow_Models_Tests_Precommit, PyTorch_Models_Tests, NVIDIA_Plugin, Openvino_tokenizers]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ jobs:
with:
runner: 'aks-linux-16-cores-arm'
container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04"}'
event: ${{ github.event_name }}
model_scope: 'precommit'

PyTorch_Models_Tests:
name: PyTorch Models tests
Expand Down
Loading

0 comments on commit a698628

Please sign in to comment.