From 47b5ad3621b9f084c641ff3b4b46bcae310e1fd8 Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Sun, 3 Nov 2024 12:16:54 +0100 Subject: [PATCH] resolve convs --- .github/workflows/build_pr_documentation.yml | 6 ++++ .github/workflows/test_openvino.yml | 28 +++++++++---------- setup.py | 1 - ...odeling_diffusion.py => test_diffusion.py} | 0 4 files changed, 19 insertions(+), 16 deletions(-) rename tests/openvino/{test_modeling_diffusion.py => test_diffusion.py} (100%) diff --git a/.github/workflows/build_pr_documentation.yml b/.github/workflows/build_pr_documentation.yml index 188b90bb17..951669f0b4 100644 --- a/.github/workflows/build_pr_documentation.yml +++ b/.github/workflows/build_pr_documentation.yml @@ -12,6 +12,7 @@ concurrency: jobs: build_documentation: runs-on: ubuntu-latest + env: COMMIT_SHA: ${{ github.event.pull_request.head.sha }} PR_NUMBER: ${{ github.event.number }} @@ -29,6 +30,11 @@ jobs: repository: "huggingface/optimum-intel" path: optimum-intel + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: Setup environment run: | pip uninstall -y doc-builder diff --git a/.github/workflows/test_openvino.yml b/.github/workflows/test_openvino.yml index 4fa203c6d1..40b5406fd7 100644 --- a/.github/workflows/test_openvino.yml +++ b/.github/workflows/test_openvino.yml @@ -18,10 +18,10 @@ jobs: strategy: fail-fast: false matrix: - test_pattern: + test-pattern: [ - "*modeling.py", - "*modeling_diffusion.py", + "*modeling*", + "*diffusion*", "*quantization*", "*training*", "*export*", @@ -47,29 +47,27 @@ jobs: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu pip install .[openvino,openvino-tokenizers,diffusers,tests] transformers[testing]==${{ matrix.transformers-version }} - - name: Assert versions - run: | - python -c "import transformers; print(transformers.__version__); assert transformers.__version__.startswith('${{ matrix.transformers-version }}'.replace('.*', ''))" - - if: ${{ matrix.transformers-version == '4.36.0' }} name: Downgrade Accelerate run: pip install accelerate==0.* - - name: Test with Pytest (basic) + - name: Assert versions run: | - # catch failures early and quickly - pytest tests/openvino/test_modeling_basic.py --durations=0 + python -c "import transformers; print(transformers.__version__); assert transformers.__version__.startswith('${{ matrix.transformers-version }}'.replace('.*', ''))" - - name: Test with Pytest (advanced) + - name: Test with Pytest run: | - pytest tests/openvino/${{ matrix.test_pattern }} --durations=0 + pytest tests/openvino/${{ matrix.test-pattern }} --durations=0 env: HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }} - - name: Install dependencies (nightly) + - if: ${{ matrix.test-pattern == '*modeling*' }} + name: Install dependencies (nightly) run: | pip install --upgrade --pre openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly + pip uninstall -y nncf - - name: Test with Pytest (nightly) + - if: ${{ matrix.test-pattern == '*modeling*' }} + name: Test with Pytest (nightly) run: | - pytest tests/openvino/test_modeling_basic.py + pytest tests/openvino/test_modeling_basic.py --durations=0 diff --git a/setup.py b/setup.py index 8f9e489a47..e96c222415 100644 --- a/setup.py +++ b/setup.py @@ -89,7 +89,6 @@ "Intended Audience :: Education", "Intended Audience :: Science/Research", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/tests/openvino/test_modeling_diffusion.py b/tests/openvino/test_diffusion.py similarity index 100% rename from tests/openvino/test_modeling_diffusion.py rename to tests/openvino/test_diffusion.py