From 123fceb1379f035381d32ce0ca93c34b8fbdee47 Mon Sep 17 00:00:00 2001 From: Ilya Matiach Date: Wed, 29 Jan 2025 12:02:57 -0500 Subject: [PATCH] Fix CI notebook text and vision tests --- .../workflows/CI-e2e-notebooks-text-vision.yml | 7 ++++--- .github/workflows/CI-notebook-text.yml | 7 ++++--- .github/workflows/CI-notebook-vision.yml | 15 +++++++++++---- .../CI-responsibleai-text-vision-pytest.yml | 15 ++++++++------- responsibleai_vision/requirements-dev.txt | 4 +--- 5 files changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/workflows/CI-e2e-notebooks-text-vision.yml b/.github/workflows/CI-e2e-notebooks-text-vision.yml index f1cabea4b5..30ac25a469 100644 --- a/.github/workflows/CI-e2e-notebooks-text-vision.yml +++ b/.github/workflows/CI-e2e-notebooks-text-vision.yml @@ -56,7 +56,7 @@ jobs: matrix: # TODO: add macos operatingSystem: [ubuntu-latest, windows-latest] - pythonVersion: [3.8, 3.9, "3.10"] + pythonVersion: [3.9, "3.10"] flights: [""] notebookGroup: ["vis_nb_group_1", "text_nb_group_1"] @@ -142,7 +142,8 @@ jobs: cat installed-requirements-dev.txt working-directory: raiwidgets - - name: Upload requirements + - if: ${{ (matrix.operatingSystem == 'windows-latest') && (matrix.pythonVersion == '3.9') && (matrix.flights == '') && (matrix.notebookGroup == 'vis_nb_group_1') }} + name: Upload requirements uses: actions/upload-artifact@v4 with: name: requirements-dev.txt @@ -169,5 +170,5 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: raiwidgets-e2e-screen-shot + name: raiwidgets-ci-e2e-text-vision-screen-shot-${{ matrix.notebookGroup }}-${{ matrix.flights }}-${{ matrix.operatingSystem }}-${{ matrix.pythonVersion }} path: ./dist/cypress diff --git a/.github/workflows/CI-notebook-text.yml b/.github/workflows/CI-notebook-text.yml index f9395f9b5f..909bfbf11b 100644 --- a/.github/workflows/CI-notebook-text.yml +++ b/.github/workflows/CI-notebook-text.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: operatingSystem: [ubuntu-latest, windows-latest] - pythonVersion: [3.8, 3.9, "3.10"] + pythonVersion: [3.9, "3.10"] runs-on: ${{ matrix.operatingSystem }} @@ -99,7 +99,8 @@ jobs: cat installed-requirements-dev.txt working-directory: raiwidgets - - name: Upload requirements + - if: ${{ (matrix.operatingSystem == 'windows-latest') && (matrix.pythonVersion == '3.9') }} + name: Upload requirements uses: actions/upload-artifact@v4 with: name: requirements-dev.txt @@ -120,5 +121,5 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: raiwidgets-e2e-screen-shot + name: raiwidgets-ci-notebook-vision-screen-shot-${{ matrix.operatingSystem }}-${{ matrix.pythonVersion }} path: dist/cypress diff --git a/.github/workflows/CI-notebook-vision.yml b/.github/workflows/CI-notebook-vision.yml index e1ca3bdeb3..181cf58055 100644 --- a/.github/workflows/CI-notebook-vision.yml +++ b/.github/workflows/CI-notebook-vision.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: operatingSystem: [ubuntu-latest] - pythonVersion: [3.8, 3.9, "3.10"] + pythonVersion: [3.9, "3.10"] runs-on: ${{ matrix.operatingSystem }} @@ -75,6 +75,12 @@ jobs: pip install . working-directory: raiwidgets + - name: Install fastai and latest spacy individually to fix conflicts + shell: bash -l {0} + run: | + pip install fastai + pip install --upgrade "spacy<4" + - name: Install vision dependencies shell: bash -l {0} run: | @@ -96,7 +102,8 @@ jobs: cat installed-requirements-dev.txt working-directory: raiwidgets - - name: Upload requirements + - if: ${{ (matrix.operatingSystem == 'windows-latest') && (matrix.pythonVersion == '3.9') }} + name: Upload requirements uses: actions/upload-artifact@v4 with: name: requirements-dev.txt @@ -110,12 +117,12 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: notebook-test-${{ matrix.operatingSystem }}-${{ matrix.pythonVersion }} + name: ci-notebook-vision-test-${{ matrix.operatingSystem }}-${{ matrix.pythonVersion }} path: notebooks - name: Upload e2e test screen shot if: always() uses: actions/upload-artifact@v4 with: - name: raiwidgets-e2e-screen-shot + name: raiwidgets-ci-notebook-vision-screen-shot-${{ matrix.operatingSystem }}-${{ matrix.pythonVersion }} path: dist/cypress diff --git a/.github/workflows/CI-responsibleai-text-vision-pytest.yml b/.github/workflows/CI-responsibleai-text-vision-pytest.yml index 7d8b3f552c..d2ad41d629 100644 --- a/.github/workflows/CI-responsibleai-text-vision-pytest.yml +++ b/.github/workflows/CI-responsibleai-text-vision-pytest.yml @@ -16,21 +16,15 @@ jobs: matrix: packageDirectory: ["responsibleai_text", "responsibleai_vision"] operatingSystem: [ubuntu-latest, macos-latest, windows-latest] - pythonVersion: ["3.8", "3.9", "3.10"] + pythonVersion: ["3.9", "3.10"] # TODO: re-add macos-latest once build timeout issues are resolved exclude: - - packageDirectory: "responsibleai_text" - operatingSystem: macos-latest - pythonVersion: "3.8" - packageDirectory: "responsibleai_text" operatingSystem: macos-latest pythonVersion: "3.9" - packageDirectory: "responsibleai_text" operatingSystem: macos-latest pythonVersion: "3.10" - - packageDirectory: "responsibleai_vision" - operatingSystem: macos-latest - pythonVersion: "3.8" - packageDirectory: "responsibleai_vision" operatingSystem: macos-latest pythonVersion: "3.9" @@ -78,6 +72,13 @@ jobs: pip install tf-keras pip install keras==2.15 + - if: ${{ (matrix.packageDirectory == 'responsibleai_vision') }} + name: Install fastai and latest spacy individually to fix conflicts + shell: bash -l {0} + run: | + pip install fastai + pip install --upgrade "spacy<4" + - name: Install dependencies shell: bash -l {0} run: | diff --git a/responsibleai_vision/requirements-dev.txt b/responsibleai_vision/requirements-dev.txt index 170d47aa8a..9ba1bee72c 100644 --- a/responsibleai_vision/requirements-dev.txt +++ b/responsibleai_vision/requirements-dev.txt @@ -21,12 +21,10 @@ sphinx==3.1.1 sphinx-gallery==0.8.1 pydata-sphinx-theme==0.3.0 -tensorflow<=2.15 +tensorflow transformers datasets opencv-python -fastai mlflow -pydantic<2.0.0 piexif \ No newline at end of file