From 0fcdccaa003b7ea0dfe173f07dc3c1923264f6eb Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 19:08:17 +0400 Subject: [PATCH 01/92] Add build treon reusable workflow --- .github/workflows/build_treon_reusable.yml | 229 +++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 .github/workflows/build_treon_reusable.yml diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml new file mode 100644 index 00000000000..e63ab878e54 --- /dev/null +++ b/.github/workflows/build_treon_reusable.yml @@ -0,0 +1,229 @@ +name: Build Treon Reusable Workflow + +on: + workflow_call: + inputs: + runs_on: + required: true + type: string + python: + required: true + type: string + container: + required: false + type: string + default: null + +jobs: + build_treon: + name: Build treon + runs-on: ${{ inputs.runs_on }} + container: + image: ${{ inputs.container }} + options: --device /dev/dri:/dev/dri --group-add 109 --group-add 44 + volumes: + - /dev/dri:/dev/dri + steps: + - name: Set OS name + id: set_os_name + uses: actions/github-script@v7 + with: + script: | + const container = "${{ inputs.container }}"; + console.log('container', container); + const osName = !container ? "${{ inputs.runs_on }}" : container.replace(':', '-')"; + console.log('osName', osName); + core.exportVariable('OS_NAME', osName); + + #### Installation/preparation #### + # + # These steps are also copied to convert_notebooks.yml + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Dotenv Action + id: dotenv + uses: xom9ikk/dotenv@v1.0.2 + with: + path: ./.github/workflows + + - name: Install required packages + shell: bash + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo apt-get install libsndfile1 -y + fi + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python }} + + - name: Cache OpenVINO Pip Packages + id: cachepip + uses: actions/cache@v3 + with: + path: | + pipcache + key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} + + # Cache specific files to reduce downloads or prevent network issues + - name: Cache Files + id: cachefiles + uses: actions/cache@v3 + with: + path: | + # NOTE: when modifying cache paths, update FILES_CACHE_KEY in .env + # and change cache paths in both treon.yml and convert_notebooks.yml + case_00030.zip + notebooks/ct-segmentation-quantize/kits19_frames_1 + notebooks/pytorch-post-training-quantization-nncf/output/tiny-imagenet-200.zip + # omz cache location is set to this with test_replace + notebooks/optical-character-recognition/open_model_zoo_cache + notebooks/ct-scan-live-inference/kits19_frames_1 + notebooks/pytorch-quantization-aware-training/data/tiny-imagenet-200.zip + key: ${{ env.FILES_CACHE_KEY }} + + # PaddleGAN stores cache in ppgan directory in CACHE_DIR + - name: Set CACHE_DIR + shell: bash + run: | + python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' + # replace backslashes with forward slashes for Windows paths + python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' | sed -e 's/\\/\//g' >> $GITHUB_ENV + + # PaddleHub stores cache in directory pointed to by HUB_HOME environment variable + - name: Set HUB_HOME + shell: bash + run: | + echo HUB_HOME=${{ env.CACHE_DIR }}/.paddlehub >> $GITHUB_ENV + + # Cache PaddlePaddle cache directories to prevent CI failing due to network/download issues + - name: Cache PaddlePaddle cache directories + id: cacheusercache + uses: actions/cache@v3 + with: + path: | + ${{ env.HUB_HOME }} + ${{ env.CACHE_DIR }}/paddle + ${{ env.CACHE_DIR }}/ppgan + key: ${{ env.USER_CACHE_KEY }}-${{ runner.os }} + + - name: Cache openvino packages + if: steps.cachepip.outputs.cache-hit != 'true' + run: | + python -m pip install --upgrade pip + mkdir pipcache + python -m pip install --cache-dir pipcache --no-deps openvino openvino-dev nncf + cp -r pipcache pipcache_openvino + python -m pip uninstall -y openvino openvino-dev nncf + + # Download a small dataset to use for testing purposes in monai-kidney training notebook + - name: Download CT files + if: steps.cachefiles.outputs.cache-hit != 'true' + run: | + curl -O https://storage.openvinotoolkit.org/data/test_data/openvino_notebooks/kits19/case_00030.zip + - name: Copy CT files + run: | + mkdir notebooks/ct-segmentation-quantize/kits19 + mkdir notebooks/ct-segmentation-quantize/kits19/kits19_frames + unzip case_00030.zip + cp -r case_00030 case_00001 + mv case_00030 notebooks/ct-segmentation-quantize/kits19/kits19_frames + mv case_00001 notebooks/ct-segmentation-quantize/kits19/kits19_frames + + # Prevent test aborting by timeout for 'meter-reader' and 'paddle-ocr-webcam' notebooks + - name: Download long loading models for 'meter-reader' and 'paddle-ocr-webcam' notebooks + run: | + mkdir notebooks/meter-reader/model + curl -o notebooks/meter-reader/model/meter_det_model.tar.gz 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/meter-reader/meter_det_model.tar.gz' + curl -o notebooks/meter-reader/model/meter_seg_model.tar.gz 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/meter-reader/meter_seg_model.tar.gz' + mkdir notebooks/paddle-ocr-webcam/model + curl -o notebooks/paddle-ocr-webcam/model/ch_PP-OCRv3_det_infer.tar 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/paddle-ocr/ch_PP-OCRv3_det_infer.tar' + curl -o notebooks/paddle-ocr-webcam/model/ch_PP-OCRv3_rec_infer.tar 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/paddle-ocr/ch_PP-OCRv3_rec_infer.tar' + + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r .ci/dev-requirements.txt --cache-dir pipcache + python -m ipykernel install --user --name openvino_env + + # Cache OpenVINO packages (`mv` works cross-platform) + - name: Make pipcache directory with OpenVINO packages + if: steps.cachepip.outputs.cache-hit != 'true' + run: | + mv pipcache pipcache_full + mv pipcache_openvino pipcache + + # Create list of installed pip packages that can be downloaded as artifacts + # to verify the exact environment of a specific test run + - name: pip freeze + run: | + python -m pip freeze + python -m pip freeze > pip-freeze-${{ github.sha }}-${{ env.OS_NAME }}-${{ inputs.python }}.txt + - name: Upload pip freeze artifact + uses: actions/upload-artifact@v4 + with: + name: pip-freeze-${{ env.OS_NAME }}-${{ inputs.python }} + path: pip-freeze-${{ github.sha }}-${{ env.OS_NAME }}-${{ inputs.python }}.txt + #### End installation/preparation + + - name: Check install + run: | + python check_install.py + + # Patch long running cells to run faster + - name: Patch notebooks + run: | + python .ci/patch_notebooks.py . + + # Test that JupyterLab runs without errors + - name: Test Jupyterlab + run: | + jupyter lab notebooks --help + + # Main notebooks test. Verifies that all notebooks run without errors + - name: Analysing with treon (Windows) python > 3.8 + if: runner.os == 'Windows' && inputs.python != '3.8' + shell: bash + run: | + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 + - name: Analysing with treon (Windows) python 3.8 + if: runner.os == 'Windows' && inputs.python == '3.8' + shell: bash + run: | + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 + - name: Analysing with treon (Linux) python > 3.8 + if: runner.os == 'Linux' && inputs.python != '3.8' + shell: bash + run: | + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + - name: Analysing with treon (Linux) python 3.8 + if: runner.os == 'Linux' && inputs.python == '3.8' + shell: bash + run: | + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + - name: Analysing with treon (MacOS) python > 3.8 + if: runner.os == 'MacOS' && inputs.python != '3.8' + shell: bash + run: | + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + - name: Analysing with treon (MacOS) python 3.8 + if: runner.os == 'MacOS' && inputs.python == '3.8' + shell: bash + run: | + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + + - name: Archive notebook test report + if: always() + uses: actions/upload-artifact@v4 + with: + name: test_report-${{ env.OS_NAME }}-${{ inputs.python }} + path: test_report/ + + # Show the cache after running the notebooks + - name: Show cache + if: runner.os != 'Windows' + run: | + ls -laR ${{ env.CACHE_DIR }} + du -sh ${{ env.CACHE_DIR }} From 619c27b52b5a966c8c4e04101bf5b5c82ebf6889 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 19:09:47 +0400 Subject: [PATCH 02/92] Enable build treon reusable workflow --- .github/workflows/treon.yml | 209 ++++-------------------------------- 1 file changed, 19 insertions(+), 190 deletions(-) diff --git a/.github/workflows/treon.yml b/.github/workflows/treon.yml index c6c531184e1..d31a6e501ba 100644 --- a/.github/workflows/treon.yml +++ b/.github/workflows/treon.yml @@ -17,205 +17,34 @@ concurrency: cancel-in-progress: true jobs: - build_treon: - runs-on: ${{ matrix.os }} + build_treon_cpu: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] + runs_on: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] python: ['3.8', '3.9', '3.10'] - steps: - #### Installation/preparation #### - # - # These steps are also copied to convert_notebooks.yml - - - name: Checkout repository - uses: actions/checkout@v4 - - name: Dotenv Action - id: dotenv - uses: xom9ikk/dotenv@v1.0.2 - with: - path: ./.github/workflows - - name: Install required packages - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt-get install libsndfile1 -y - fi - shell: bash - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - - - name: Cache OpenVINO Pip Packages - id: cachepip - uses: actions/cache@v3 - with: - path: | - pipcache - key: ${{ env.PIP_CACHE_KEY }}-${{ matrix.os }}-${{ matrix.python }} - - # Cache specific files to reduce downloads or prevent network issues - - name: Cache Files - id: cachefiles - uses: actions/cache@v3 - with: - path: | - # NOTE: when modifying cache paths, update FILES_CACHE_KEY in .env - # and change cache paths in both treon.yml and convert_notebooks.yml - case_00030.zip - notebooks/ct-segmentation-quantize/kits19_frames_1 - notebooks/pytorch-post-training-quantization-nncf/output/tiny-imagenet-200.zip - # omz cache location is set to this with test_replace - notebooks/optical-character-recognition/open_model_zoo_cache - notebooks/ct-scan-live-inference/kits19_frames_1 - notebooks/pytorch-quantization-aware-training/data/tiny-imagenet-200.zip - key: ${{ env.FILES_CACHE_KEY }} - # PaddleGAN stores cache in ppgan directory in CACHE_DIR - - name: Set CACHE_DIR - shell: bash - run: | - python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' - # replace backslashes with forward slashes for Windows paths - python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' | sed -e 's/\\/\//g' >> $GITHUB_ENV - - # PaddleHub stores cache in directory pointed to by HUB_HOME environment variable - - name: Set HUB_HOME - shell: bash - run: | - echo HUB_HOME=${{ env.CACHE_DIR }}/.paddlehub >> $GITHUB_ENV - - # Cache PaddlePaddle cache directories to prevent CI failing due to network/download issues - - name: Cache PaddlePaddle cache directories - id: cacheusercache - uses: actions/cache@v3 - with: - path: | - ${{ env.HUB_HOME }} - ${{ env.CACHE_DIR }}/paddle - ${{ env.CACHE_DIR }}/ppgan - key: ${{ env.USER_CACHE_KEY }}-${{ runner.os }} - - name: Cache openvino packages - if: steps.cachepip.outputs.cache-hit != 'true' - run: | - python -m pip install --upgrade pip - mkdir pipcache - python -m pip install --cache-dir pipcache --no-deps openvino openvino-dev nncf - cp -r pipcache pipcache_openvino - python -m pip uninstall -y openvino openvino-dev nncf - - # Download a small dataset to use for testing purposes in monai-kidney training notebook - - name: Download CT files - if: steps.cachefiles.outputs.cache-hit != 'true' - run: | - curl -O https://storage.openvinotoolkit.org/data/test_data/openvino_notebooks/kits19/case_00030.zip - - name: Copy CT files - run: | - mkdir notebooks/ct-segmentation-quantize/kits19 - mkdir notebooks/ct-segmentation-quantize/kits19/kits19_frames - unzip case_00030.zip - cp -r case_00030 case_00001 - mv case_00030 notebooks/ct-segmentation-quantize/kits19/kits19_frames - mv case_00001 notebooks/ct-segmentation-quantize/kits19/kits19_frames - # Prevent test aborting by timeout - - name: Download long loading models - run: | - mkdir notebooks/meter-reader/model - curl -o notebooks/meter-reader/model/meter_det_model.tar.gz 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/meter-reader/meter_det_model.tar.gz' - curl -o notebooks/meter-reader/model/meter_seg_model.tar.gz 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/meter-reader/meter_seg_model.tar.gz' - mkdir notebooks/paddle-ocr-webcam/model - curl -o notebooks/paddle-ocr-webcam/model/ch_PP-OCRv3_det_infer.tar 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/paddle-ocr/ch_PP-OCRv3_det_infer.tar' - curl -o notebooks/paddle-ocr-webcam/model/ch_PP-OCRv3_rec_infer.tar 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/paddle-ocr/ch_PP-OCRv3_rec_infer.tar' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r .ci/dev-requirements.txt --cache-dir pipcache - python -m ipykernel install --user --name openvino_env - - # Cache OpenVINO packages. mv works cross-platform - - name: Make pipcache directory with OpenVINO packages - if: steps.cachepip.outputs.cache-hit != 'true' - run: | - mv pipcache pipcache_full - mv pipcache_openvino pipcache + uses: ./.github/workflows/build_treon_reusable.yml + with: + runs_on: ${{ matrix.runs_on }} + python: ${{ matrix.python }} - # Create list of installed pip packages that can be downloaded as artifacts - # to verify the exact environment of a specific test run - - name: Pip freeze - run: | - python -m pip freeze - python -m pip freeze > pip-freeze-${{ github.sha }}-${{matrix.os}}-${{ matrix.python }}.txt - - name: Archive pip freeze - uses: actions/upload-artifact@v4 - with: - name: pip-freeze-${{matrix.os}}-${{ matrix.python }} - path: pip-freeze-${{ github.sha }}-${{matrix.os}}-${{ matrix.python }}.txt - - #### End installation/preparation - - - name: Check install - run: | - python check_install.py - - # Patch long running cells to run faster - - name: Patch notebooks - run: | - python .ci/patch_notebooks.py . - - # Test that JupyterLab runs without errors - - name: Test Jupyterlab - run: | - jupyter lab notebooks --help - - # Main notebooks test. Verifies that all notebooks run without errors - - name: Analysing with treon (Windows) python > 3.8 - if: runner.os == 'Windows' && matrix.python != '3.8' - run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} --move_notebooks_dir c:/notebooks --timeout 1200 - shell: bash - - name: Analysing with treon (Windows) python 3.8 - if: runner.os == 'Windows' && matrix.python == '3.8' - run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} --move_notebooks_dir c:/notebooks --timeout 1200 - shell: bash - - name: Analysing with treon (Linux) python > 3.8 - if: runner.os == 'Linux' && matrix.python != '3.8' - run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} --timeout 1200 - shell: bash - - name: Analysing with treon (Linux) python 3.8 - if: runner.os == 'Linux' && matrix.python == '3.8' - run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} --timeout 1200 - shell: bash - - name: Analysing with treon (MacOS) python > 3.8 - if: runner.os == 'MacOS' && matrix.python != '3.8' - run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} --timeout 1200 - shell: bash - - name: Analysing with treon (MacOS) python 3.8 - if: runner.os == 'MacOS' && matrix.python == '3.8' - run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} --timeout 1200 - shell: bash - - name: Archive notebook test report - if: always() - uses: actions/upload-artifact@v4 - with: - name: test_report-${{matrix.os}}-${{ matrix.python }} - path: test_report/ - - # Show the cache after running the notebooks - - name: Show cache - run: | - ls -laR ${{ env.CACHE_DIR }} - du -sh ${{ env.CACHE_DIR }} - if: runner.os != 'Windows' + build_treon_gpu: + strategy: + fail-fast: false + matrix: + runs_on: ['gpu'] + python: ['3.8', '3.9', '3.10'] + container: [ubuntu:20.04, ubuntu:22.04] # Windows and macOS are not available in machine pool with GPU + uses: ./.github/workflows/build_treon_reusable.yml + with: + runs_on: ${{ matrix.runs_on }} + python: ${{ matrix.python }} + container: ${{ matrix.container }} aggregate_notebooks_reports: if: always() runs-on: ubuntu-20.04 - needs: build_treon + needs: [build_treon_cpu, build_treon_gpu] steps: - name: Checkout repository uses: actions/checkout@v4 From d6cca53daf0aa9bcfc57b63ade69c9b89e7b6daa Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 19:13:23 +0400 Subject: [PATCH 03/92] [Test] Limit testing notebooks --- .ci/validate_notebooks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci/validate_notebooks.py b/.ci/validate_notebooks.py index 475d364d8bc..2776cb6fedc 100644 --- a/.ci/validate_notebooks.py +++ b/.ci/validate_notebooks.py @@ -122,6 +122,8 @@ def prepare_test_plan(test_list: Optional[List[str]], ignore_list: List[str], nb f"Received test list: {test_list}" ) testing_notebooks = list(set(testing_notebooks)) + # TODO Remove after testing + testing_notebooks = testing_notebooks[:1] print(f"Testing notebooks: {testing_notebooks}") for notebook in test_plan: From b6ed5064b0e9d72d3030a0c39fab4c76dd781143 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 19:22:15 +0400 Subject: [PATCH 04/92] Fix container matrix --- .github/workflows/treon.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/treon.yml b/.github/workflows/treon.yml index d31a6e501ba..8a8555f9b80 100644 --- a/.github/workflows/treon.yml +++ b/.github/workflows/treon.yml @@ -34,7 +34,7 @@ jobs: matrix: runs_on: ['gpu'] python: ['3.8', '3.9', '3.10'] - container: [ubuntu:20.04, ubuntu:22.04] # Windows and macOS are not available in machine pool with GPU + container: ['ubuntu:20.04', 'ubuntu:22.04'] # Windows and macOS are not available in machine pool with GPU uses: ./.github/workflows/build_treon_reusable.yml with: runs_on: ${{ matrix.runs_on }} From 6cb3bfa7310d796ad57841ec2ca9dec79da941bf Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 19:26:31 +0400 Subject: [PATCH 05/92] Fix script syntax --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index e63ab878e54..c1fbdf1d29c 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -31,7 +31,7 @@ jobs: script: | const container = "${{ inputs.container }}"; console.log('container', container); - const osName = !container ? "${{ inputs.runs_on }}" : container.replace(':', '-')"; + const osName = !container ? "${{ inputs.runs_on }}" : container.replace(':', '-'); console.log('osName', osName); core.exportVariable('OS_NAME', osName); From 4e4aadf6404445da79c9b84918ddb43f858d8b4d Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 19:34:47 +0400 Subject: [PATCH 06/92] Remove job name --- .github/workflows/build_treon_reusable.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index c1fbdf1d29c..95abb997de2 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -16,7 +16,6 @@ on: jobs: build_treon: - name: Build treon runs-on: ${{ inputs.runs_on }} container: image: ${{ inputs.container }} From 46878b155472abc0b9e51e1cd2fb563bab769284 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 20:24:27 +0400 Subject: [PATCH 07/92] Comment set os name step --- .github/workflows/build_treon_reusable.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 95abb997de2..f8f3d039320 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -23,16 +23,16 @@ jobs: volumes: - /dev/dri:/dev/dri steps: - - name: Set OS name - id: set_os_name - uses: actions/github-script@v7 - with: - script: | - const container = "${{ inputs.container }}"; - console.log('container', container); - const osName = !container ? "${{ inputs.runs_on }}" : container.replace(':', '-'); - console.log('osName', osName); - core.exportVariable('OS_NAME', osName); + # - name: Set OS name + # id: set_os_name + # uses: actions/github-script@v7 + # with: + # script: | + # const container = "${{ inputs.container }}"; + # console.log('container', container); + # const osName = !container ? "${{ inputs.runs_on }}" : container.replace(':', '-'); + # console.log('osName', osName); + # core.exportVariable('OS_NAME', osName); #### Installation/preparation #### # From 168f509abfe36e2c556efb5fd11783cea1cc2610 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 20:32:24 +0400 Subject: [PATCH 08/92] Use runs_on as os name --- .github/workflows/build_treon_reusable.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index f8f3d039320..2a01b9d84ad 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -64,7 +64,7 @@ jobs: with: path: | pipcache - key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} + key: ${{ env.PIP_CACHE_KEY }}-${{ inputs.runs_on }}-${{ inputs.python }} # Cache specific files to reduce downloads or prevent network issues - name: Cache Files @@ -159,12 +159,12 @@ jobs: - name: pip freeze run: | python -m pip freeze - python -m pip freeze > pip-freeze-${{ github.sha }}-${{ env.OS_NAME }}-${{ inputs.python }}.txt + python -m pip freeze > pip-freeze-${{ github.sha }}-${{ inputs.runs_on }}-${{ inputs.python }}.txt - name: Upload pip freeze artifact uses: actions/upload-artifact@v4 with: - name: pip-freeze-${{ env.OS_NAME }}-${{ inputs.python }} - path: pip-freeze-${{ github.sha }}-${{ env.OS_NAME }}-${{ inputs.python }}.txt + name: pip-freeze-${{ inputs.runs_on }}-${{ inputs.python }} + path: pip-freeze-${{ github.sha }}-${{ inputs.runs_on }}-${{ inputs.python }}.txt #### End installation/preparation - name: Check install @@ -186,38 +186,38 @@ jobs: if: runner.os == 'Windows' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 - name: Analysing with treon (Windows) python 3.8 if: runner.os == 'Windows' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 - name: Analysing with treon (Linux) python > 3.8 if: runner.os == 'Linux' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --timeout 1200 - name: Analysing with treon (Linux) python 3.8 if: runner.os == 'Linux' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --timeout 1200 - name: Analysing with treon (MacOS) python > 3.8 if: runner.os == 'MacOS' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --timeout 1200 - name: Analysing with treon (MacOS) python 3.8 if: runner.os == 'MacOS' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --timeout 1200 - name: Archive notebook test report if: always() uses: actions/upload-artifact@v4 with: - name: test_report-${{ env.OS_NAME }}-${{ inputs.python }} + name: test_report-${{ inputs.runs_on }}-${{ inputs.python }} path: test_report/ # Show the cache after running the notebooks From bb6a7b4ea9dffaec4ef05e55fd37cf30670d59a3 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 20:56:25 +0400 Subject: [PATCH 09/92] Revert "Use runs_on as os name" This reverts commit 168f509abfe36e2c556efb5fd11783cea1cc2610. --- .github/workflows/build_treon_reusable.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 2a01b9d84ad..f8f3d039320 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -64,7 +64,7 @@ jobs: with: path: | pipcache - key: ${{ env.PIP_CACHE_KEY }}-${{ inputs.runs_on }}-${{ inputs.python }} + key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} # Cache specific files to reduce downloads or prevent network issues - name: Cache Files @@ -159,12 +159,12 @@ jobs: - name: pip freeze run: | python -m pip freeze - python -m pip freeze > pip-freeze-${{ github.sha }}-${{ inputs.runs_on }}-${{ inputs.python }}.txt + python -m pip freeze > pip-freeze-${{ github.sha }}-${{ env.OS_NAME }}-${{ inputs.python }}.txt - name: Upload pip freeze artifact uses: actions/upload-artifact@v4 with: - name: pip-freeze-${{ inputs.runs_on }}-${{ inputs.python }} - path: pip-freeze-${{ github.sha }}-${{ inputs.runs_on }}-${{ inputs.python }}.txt + name: pip-freeze-${{ env.OS_NAME }}-${{ inputs.python }} + path: pip-freeze-${{ github.sha }}-${{ env.OS_NAME }}-${{ inputs.python }}.txt #### End installation/preparation - name: Check install @@ -186,38 +186,38 @@ jobs: if: runner.os == 'Windows' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 - name: Analysing with treon (Windows) python 3.8 if: runner.os == 'Windows' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 - name: Analysing with treon (Linux) python > 3.8 if: runner.os == 'Linux' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 - name: Analysing with treon (Linux) python 3.8 if: runner.os == 'Linux' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 - name: Analysing with treon (MacOS) python > 3.8 if: runner.os == 'MacOS' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 - name: Analysing with treon (MacOS) python 3.8 if: runner.os == 'MacOS' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ inputs.runs_on }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 - name: Archive notebook test report if: always() uses: actions/upload-artifact@v4 with: - name: test_report-${{ inputs.runs_on }}-${{ inputs.python }} + name: test_report-${{ env.OS_NAME }}-${{ inputs.python }} path: test_report/ # Show the cache after running the notebooks From 5fafe9398c4b7788ebaf9d24d7896b0517a6dcd0 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 20:56:32 +0400 Subject: [PATCH 10/92] Revert "Comment set os name step" This reverts commit 46878b155472abc0b9e51e1cd2fb563bab769284. --- .github/workflows/build_treon_reusable.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index f8f3d039320..95abb997de2 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -23,16 +23,16 @@ jobs: volumes: - /dev/dri:/dev/dri steps: - # - name: Set OS name - # id: set_os_name - # uses: actions/github-script@v7 - # with: - # script: | - # const container = "${{ inputs.container }}"; - # console.log('container', container); - # const osName = !container ? "${{ inputs.runs_on }}" : container.replace(':', '-'); - # console.log('osName', osName); - # core.exportVariable('OS_NAME', osName); + - name: Set OS name + id: set_os_name + uses: actions/github-script@v7 + with: + script: | + const container = "${{ inputs.container }}"; + console.log('container', container); + const osName = !container ? "${{ inputs.runs_on }}" : container.replace(':', '-'); + console.log('osName', osName); + core.exportVariable('OS_NAME', osName); #### Installation/preparation #### # From f7b44ef1aa1bdf815d0df9578aeabf709c730b5a Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 22 May 2024 20:57:45 +0400 Subject: [PATCH 11/92] Remove uninstalling openvino packages --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 95abb997de2..45d02a4da0d 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -115,7 +115,7 @@ jobs: mkdir pipcache python -m pip install --cache-dir pipcache --no-deps openvino openvino-dev nncf cp -r pipcache pipcache_openvino - python -m pip uninstall -y openvino openvino-dev nncf + # python -m pip uninstall -y openvino openvino-dev nncf # Download a small dataset to use for testing purposes in monai-kidney training notebook - name: Download CT files From d2d2ff33315c0d4ea910f00401cf0e2db6e3dd4d Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 14:01:30 +0400 Subject: [PATCH 12/92] [Testing] Disable precommit workflow --- .github/workflows/treon_precommit.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/treon_precommit.yml b/.github/workflows/treon_precommit.yml index 75b96bc31cf..30727eee208 100644 --- a/.github/workflows/treon_precommit.yml +++ b/.github/workflows/treon_precommit.yml @@ -31,12 +31,14 @@ concurrency: jobs: build_treon: + # TODO Remove after testing + if: false runs-on: ${{ matrix.os }} strategy: fail-fast: true matrix: os: [ubuntu-20.04, windows-2019, macos-12] - python: ["3.10", "3.9", "3.8"] + python: ['3.10', '3.9', '3.8'] steps: #### Installation/preparation #### # @@ -139,7 +141,7 @@ jobs: cp -r pipcache pipcache_openvino python -m pip uninstall -y openvino openvino-dev nncf - # Download a small dataset to use for testing purposes in monai-kidney training notebook + # Download a small dataset to use for testing purposes in monai-kidney training notebook - name: Download CT files if: steps.cachefiles.outputs.cache-hit != 'true' run: | From b77dc72f2b610c81ca9c16a6e6fa8a934e6c3221 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 14:01:56 +0400 Subject: [PATCH 13/92] [Testing] Add pr trigger for nightly workflow --- .github/workflows/treon.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/treon.yml b/.github/workflows/treon.yml index 8a8555f9b80..2288b19fdad 100644 --- a/.github/workflows/treon.yml +++ b/.github/workflows/treon.yml @@ -11,6 +11,11 @@ on: - '.github/workflows/.env' schedule: - cron: '30 8 * * *' + # TODO Remove after testing + pull_request: + branches: + - 'main' + - 'latest' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} From 4423d12f6f2f581d54cf7b3317fd9c9b6c24c1a5 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 14:21:58 +0400 Subject: [PATCH 14/92] Remove sudo for installing apt dependencies in container mode --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 45d02a4da0d..f80481e8dd3 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -50,7 +50,7 @@ jobs: shell: bash run: | if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt-get install libsndfile1 -y + ${{ !inputs.container && 'sudo' }} apt-get install libsndfile1 -y fi - name: Set up Python From 7af1b5c625c11e91634b8b4e66ab3fd13a7b1744 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 14:24:34 +0400 Subject: [PATCH 15/92] Fix ternary operator in workflow --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index f80481e8dd3..82cc8c75bf8 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -50,7 +50,7 @@ jobs: shell: bash run: | if [ "$RUNNER_OS" == "Linux" ]; then - ${{ !inputs.container && 'sudo' }} apt-get install libsndfile1 -y + ${{ !inputs.container && 'sudo' || '' }} apt-get install libsndfile1 -y fi - name: Set up Python From 061fd3f2ccc19d523efb533065ac6d07ebbd9bb3 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 14:28:29 +0400 Subject: [PATCH 16/92] [Testing] Disable redeploy after nightly --- .github/workflows/gh_pages_deploy.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gh_pages_deploy.yml b/.github/workflows/gh_pages_deploy.yml index c476de7bed6..4c1a10629d0 100644 --- a/.github/workflows/gh_pages_deploy.yml +++ b/.github/workflows/gh_pages_deploy.yml @@ -5,10 +5,11 @@ on: branches: - 'main' - 'latest' - workflow_run: - workflows: [treon_nightly] - types: - - completed + # TODO Remove after testing + # workflow_run: + # workflows: [treon_nightly] + # types: + # - completed workflow_dispatch: concurrency: From 38236704c66cadbd689933117e053bd659e093cf Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 14:30:29 +0400 Subject: [PATCH 17/92] Add apt update for container use case --- .github/workflows/build_treon_reusable.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 82cc8c75bf8..c8533a06c69 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -50,6 +50,7 @@ jobs: shell: bash run: | if [ "$RUNNER_OS" == "Linux" ]; then + ${{ !inputs.container && 'sudo' || '' }} apt-get update ${{ !inputs.container && 'sudo' || '' }} apt-get install libsndfile1 -y fi From 4c674077263a34df1a0f6d88bf279219fc121a18 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 15:04:28 +0400 Subject: [PATCH 18/92] [Testing] Change artifact name to prevent overriding --- .github/workflows/treon.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/treon.yml b/.github/workflows/treon.yml index 2288b19fdad..50811ed3336 100644 --- a/.github/workflows/treon.yml +++ b/.github/workflows/treon.yml @@ -69,6 +69,7 @@ jobs: - name: Upload aggregated report uses: actions/upload-artifact@v4 with: - name: notebooks-status-map.json + # TODO Remove after testing + name: test-notebooks-status-map.json path: test_reports/notebooks-status-map.json if-no-files-found: error From 837b569006d10b849b33088d7473c6e546a9e1f2 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 15:34:39 +0400 Subject: [PATCH 19/92] Add libssl installation --- .github/workflows/build_treon_reusable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index c8533a06c69..eed41429b71 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -50,8 +50,8 @@ jobs: shell: bash run: | if [ "$RUNNER_OS" == "Linux" ]; then - ${{ !inputs.container && 'sudo' || '' }} apt-get update - ${{ !inputs.container && 'sudo' || '' }} apt-get install libsndfile1 -y + ${{ !inputs.container && 'sudo' || '' }} apt-get update -y + ${{ !inputs.container && 'sudo' || '' }} apt-get install libsndfile1 libssl-dev -y fi - name: Set up Python From 095134217cbad77227e1c0e1dc13aaa027f51a91 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 16:30:19 +0400 Subject: [PATCH 20/92] Add separate step for installing dependencies in container --- .github/workflows/build_treon_reusable.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index eed41429b71..ee84d09b186 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -47,11 +47,21 @@ jobs: path: ./.github/workflows - name: Install required packages + if: !inputs.container shell: bash run: | if [ "$RUNNER_OS" == "Linux" ]; then - ${{ !inputs.container && 'sudo' || '' }} apt-get update -y - ${{ !inputs.container && 'sudo' || '' }} apt-get install libsndfile1 libssl-dev -y + sudo apt-get update -y + sudo apt-get install libsndfile1 -y + fi + + - name: Install required packages (container) + if: inputs.container + shell: bash + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + apt-get update -y + apt-get install curl libsndfile1 libssl-dev glibc -y fi - name: Set up Python From 32b9e59c45d89f97491e54415b97da7be485f424 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 16:32:16 +0400 Subject: [PATCH 21/92] Fix steps if statements --- .github/workflows/build_treon_reusable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index ee84d09b186..a32416d6337 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -47,7 +47,7 @@ jobs: path: ./.github/workflows - name: Install required packages - if: !inputs.container + if: ${{ !inputs.container }} shell: bash run: | if [ "$RUNNER_OS" == "Linux" ]; then @@ -56,7 +56,7 @@ jobs: fi - name: Install required packages (container) - if: inputs.container + if: ${{ inputs.container }} shell: bash run: | if [ "$RUNNER_OS" == "Linux" ]; then From ad6bf3b26560a35d832fc65a6ffe34da34c82e6f Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 17:26:02 +0400 Subject: [PATCH 22/92] Remove glibc installation --- .github/workflows/build_treon_reusable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index a32416d6337..39426f53589 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -61,13 +61,13 @@ jobs: run: | if [ "$RUNNER_OS" == "Linux" ]; then apt-get update -y - apt-get install curl libsndfile1 libssl-dev glibc -y + apt-get install curl libsndfile1 libssl-dev -y fi - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ inputs.python }} + python-version: '${{ inputs.python }}' - name: Cache OpenVINO Pip Packages id: cachepip From 046e4bf888110a9c2f827ce149c5d15624af8788 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 17:28:33 +0400 Subject: [PATCH 23/92] Add unzip apt dependency --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 39426f53589..fa53bcf5230 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -61,7 +61,7 @@ jobs: run: | if [ "$RUNNER_OS" == "Linux" ]; then apt-get update -y - apt-get install curl libsndfile1 libssl-dev -y + apt-get install curl libsndfile1 libssl-dev unzip -y fi - name: Set up Python From d9ff679156b912202b6af7cebe59301d4ee2617f Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 18:11:52 +0400 Subject: [PATCH 24/92] Enable test device and test report dir variables --- .github/workflows/build_treon_reusable.yml | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index fa53bcf5230..45e048acef5 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -23,16 +23,18 @@ jobs: volumes: - /dev/dri:/dev/dri steps: - - name: Set OS name - id: set_os_name + - name: Set env variables uses: actions/github-script@v7 with: script: | const container = "${{ inputs.container }}"; - console.log('container', container); + const runsOn = "${{ inputs.runs_on }}"; const osName = !container ? "${{ inputs.runs_on }}" : container.replace(':', '-'); - console.log('osName', osName); + const testDevice = runsOn === 'gpu' ? 'gpu' : 'cpu'; + const testReportDir = `${testDevice}-${osName}-${{ inputs.python }}`; core.exportVariable('OS_NAME', osName); + core.exportVariable('TEST_DEVICE', testDevice); + core.exportVariable('TEST_REPORT_DIR', testReportDir); #### Installation/preparation #### # @@ -170,12 +172,12 @@ jobs: - name: pip freeze run: | python -m pip freeze - python -m pip freeze > pip-freeze-${{ github.sha }}-${{ env.OS_NAME }}-${{ inputs.python }}.txt + python -m pip freeze > pip-freeze-${{ env.TEST_DEVICE }}-${{ github.sha }}-${{ env.OS_NAME }}-${{ inputs.python }}.txt - name: Upload pip freeze artifact uses: actions/upload-artifact@v4 with: - name: pip-freeze-${{ env.OS_NAME }}-${{ inputs.python }} - path: pip-freeze-${{ github.sha }}-${{ env.OS_NAME }}-${{ inputs.python }}.txt + name: pip-freeze-${{ env.TEST_DEVICE }}-${{ env.OS_NAME }}-${{ inputs.python }} + path: pip-freeze-${{ env.TEST_DEVICE }}-${{ github.sha }}-${{ env.OS_NAME }}-${{ inputs.python }}.txt #### End installation/preparation - name: Check install @@ -185,7 +187,7 @@ jobs: # Patch long running cells to run faster - name: Patch notebooks run: | - python .ci/patch_notebooks.py . + python .ci/patch_notebooks.py . -td ${{ env.TEST_DEVICE }} # Test that JupyterLab runs without errors - name: Test Jupyterlab @@ -197,38 +199,38 @@ jobs: if: runner.os == 'Windows' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --move_notebooks_dir c:/notebooks --timeout 1200 - name: Analysing with treon (Windows) python 3.8 if: runner.os == 'Windows' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --move_notebooks_dir c:/notebooks --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --move_notebooks_dir c:/notebooks --timeout 1200 - name: Analysing with treon (Linux) python > 3.8 if: runner.os == 'Linux' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --timeout 1200 - name: Analysing with treon (Linux) python 3.8 if: runner.os == 'Linux' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --timeout 1200 - name: Analysing with treon (MacOS) python > 3.8 if: runner.os == 'MacOS' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --timeout 1200 - name: Analysing with treon (MacOS) python 3.8 if: runner.os == 'MacOS' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.OS_NAME }}-${{ inputs.python }} --timeout 1200 + python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --timeout 1200 - name: Archive notebook test report if: always() uses: actions/upload-artifact@v4 with: - name: test_report-${{ env.OS_NAME }}-${{ inputs.python }} + name: test_report-${{ env.TEST_REPORT_DIR }} path: test_report/ # Show the cache after running the notebooks From 8bfd87695736f5cc82d17416c34681282e5b416d Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 18:26:37 +0400 Subject: [PATCH 25/92] Add device to aggregate notebook report generation --- .ci/aggregate_notebooks_reports.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.ci/aggregate_notebooks_reports.py b/.ci/aggregate_notebooks_reports.py index 445dc88c540..434d530e3ad 100644 --- a/.ci/aggregate_notebooks_reports.py +++ b/.ci/aggregate_notebooks_reports.py @@ -10,25 +10,29 @@ class ValidationMatrix: os = ("ubuntu-20.04", "ubuntu-22.04", "windows-2019", "macos-12") python = ("3.8", "3.9", "3.10") + device = ("cpu", "gpu") @classmethod def values(cls): - return product(cls.os, cls.python) + return product(cls.device, cls.os, cls.python) -def get_report_file_path(os: str, python: str) -> Path: - return Path(REPORTS_DIR) / f"{os}-{python}" / "test_report.csv" +def get_report_file_path(device: str, os: str, python: str) -> Path: + return Path(REPORTS_DIR) / f"{device}-{os}-{python}" / "test_report.csv" def get_default_status_dict(notebook_name: str) -> Dict: default_status = None - def _get_python_status_dict(): + def _get_python_dict(): return dict((python, default_status) for python in ValidationMatrix.python) + def _get_device_dict(): + return dict((device, _get_python_dict()) for device in ValidationMatrix.device) + return { "name": notebook_name, - "status": dict((os, _get_python_status_dict()) for os in ValidationMatrix.os), + "status": dict((os, _get_device_dict()) for os in ValidationMatrix.os), } @@ -39,8 +43,11 @@ def write_json_file(filename: str, data: Dict): def main(): NOTEBOOKS_STATUS_MAP = {} - for os, python in ValidationMatrix.values(): - report_file_path = get_report_file_path(os, python) + for device, os, python in ValidationMatrix.values(): + if device == "gpu" and not os.startswith("ubuntu"): + print(f'Tests are not available for "{device}" device and "{os}".') + continue + report_file_path = get_report_file_path(device, os, python) if not report_file_path.exists(): print(f'Report file "{report_file_path}" does not exists.') continue @@ -51,7 +58,7 @@ def main(): status = row["status"] if name not in NOTEBOOKS_STATUS_MAP: NOTEBOOKS_STATUS_MAP[name] = get_default_status_dict(name) - NOTEBOOKS_STATUS_MAP[name]["status"][os][python] = status + NOTEBOOKS_STATUS_MAP[name]["status"][os][device][python] = status write_json_file(Path(REPORTS_DIR) / "notebooks-status-map.json", NOTEBOOKS_STATUS_MAP) From 3959b1e5115f3d8bb7177a1369e1ae4102030bdf Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 19:18:19 +0400 Subject: [PATCH 26/92] Add installation of ov dependencies and gpu drivers --- .github/workflows/build_treon_reusable.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 45e048acef5..87760019266 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -63,9 +63,24 @@ jobs: run: | if [ "$RUNNER_OS" == "Linux" ]; then apt-get update -y - apt-get install curl libsndfile1 libssl-dev unzip -y + apt-get install curl wget libsndfile1 libssl-dev unzip -y + wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh + install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y fi + - name: Install GPU Drivers + if: ${{ inputs.container }} + shell: bash + run: | + wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.15985.7/intel-igc-core_1.0.15985.7_amd64.deb + wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.15985.7/intel-igc-opencl_1.0.15985.7_amd64.deb + wget https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/intel-level-zero-gpu-dbgsym_1.3.28454.6_amd64.ddeb + wget https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/intel-level-zero-gpu_1.3.28454.6_amd64.deb + wget https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/intel-opencl-icd-dbgsym_24.05.28454.6_amd64.ddeb + wget https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/intel-opencl-icd_24.05.28454.6_amd64.deb + wget https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/libigdgmm12_22.3.11_amd64.deb + dpkg -i *.deb + - name: Set up Python uses: actions/setup-python@v5 with: From ed19d1bd8870b5661379f4e57804f6d544716bab Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 19:27:41 +0400 Subject: [PATCH 27/92] List dir --- .github/workflows/build_treon_reusable.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 87760019266..6b17099d0ce 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -65,7 +65,8 @@ jobs: apt-get update -y apt-get install curl wget libsndfile1 libssl-dev unzip -y wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh - install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y + ls -la + ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y fi - name: Install GPU Drivers From 82478193f2d24e740fb1eec8459c6cb4987c99f8 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 19:32:01 +0400 Subject: [PATCH 28/92] Change downloaded script permissions --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 6b17099d0ce..15c4dbb2dfd 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -65,7 +65,7 @@ jobs: apt-get update -y apt-get install curl wget libsndfile1 libssl-dev unzip -y wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh - ls -la + chmod +x ./install_openvino_dependencies.sh ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y fi From 65219b94e758b6c67b44f281206f4af7458accf2 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 19:35:11 +0400 Subject: [PATCH 29/92] Add env vars to prevent user input durin packages installation --- .github/workflows/build_treon_reusable.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 15c4dbb2dfd..d0e84d43120 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -60,6 +60,9 @@ jobs: - name: Install required packages (container) if: ${{ inputs.container }} shell: bash + env: + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input + TZ: 'Europe/London' # to prevent tzdata from waiting user input run: | if [ "$RUNNER_OS" == "Linux" ]; then apt-get update -y From 36ab0a3fadf7f65cd949a1554707832adfe16e90 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 20:00:18 +0400 Subject: [PATCH 30/92] [Testing] Prevent triggering deploy workflow --- .github/workflows/treon.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/treon.yml b/.github/workflows/treon.yml index 50811ed3336..85b5b468f0a 100644 --- a/.github/workflows/treon.yml +++ b/.github/workflows/treon.yml @@ -1,4 +1,5 @@ -name: treon_nightly +# TODO Remove after testing +name: treon_nightly_test on: workflow_dispatch: @@ -47,7 +48,9 @@ jobs: container: ${{ matrix.container }} aggregate_notebooks_reports: - if: always() + # if: always() + # TODO Remove after testing + if: false runs-on: ubuntu-20.04 needs: [build_treon_cpu, build_treon_gpu] steps: From e2e1b07fe8fc08114cbfe05ef8783d712acd9673 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 20:10:31 +0400 Subject: [PATCH 31/92] Maked testing and inored notebooks sorted --- .ci/validate_notebooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/validate_notebooks.py b/.ci/validate_notebooks.py index 2776cb6fedc..6c6e599a83c 100644 --- a/.ci/validate_notebooks.py +++ b/.ci/validate_notebooks.py @@ -93,6 +93,7 @@ def prepare_test_plan(test_list: Optional[List[str]], ignore_list: List[str], nb raise ValueError( f"Ignore list items should be relative to repo root (e.g. 'notebooks/subdir/notebook.ipynb').\nInvalid ignored notebooks: {ignored_notebooks}" ) + ignored_notebooks = sorted(ignored_notebooks) print(f"Ignored notebooks: {ignored_notebooks}") testing_notebooks: List[Path] = [] @@ -121,7 +122,7 @@ def prepare_test_plan(test_list: Optional[List[str]], ignore_list: List[str], nb "Testing notebooks should be provided to '--test_list' argument as a txt file or should be empty to test all notebooks.\n" f"Received test list: {test_list}" ) - testing_notebooks = list(set(testing_notebooks)) + testing_notebooks = sorted(list(set(testing_notebooks))) # TODO Remove after testing testing_notebooks = testing_notebooks[:1] print(f"Testing notebooks: {testing_notebooks}") From 0ca2d4059497b4b42efbc4a319d8e692b4c06b88 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 20:10:42 +0400 Subject: [PATCH 32/92] Add sqlite dependency --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index d0e84d43120..85117cdb2c2 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -66,7 +66,7 @@ jobs: run: | if [ "$RUNNER_OS" == "Linux" ]; then apt-get update -y - apt-get install curl wget libsndfile1 libssl-dev unzip -y + apt-get install curl wget libsndfile1 libssl-dev unzip libsqlite3-dev libedit-dev -y wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh chmod +x ./install_openvino_dependencies.sh ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y From 9d7dfea3b9e37548a7bcee5208955282941c4450 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 20:26:09 +0400 Subject: [PATCH 33/92] Add libgl dependency --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 85117cdb2c2..49ebf02a6b9 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -66,7 +66,7 @@ jobs: run: | if [ "$RUNNER_OS" == "Linux" ]; then apt-get update -y - apt-get install curl wget libsndfile1 libssl-dev unzip libsqlite3-dev libedit-dev -y + apt-get install curl wget libsndfile1 libssl-dev unzip libsqlite3-dev libedit-dev libgl1-mesa-glx -y wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh chmod +x ./install_openvino_dependencies.sh ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y From ea29d0f0b5676778405e46f47e5263a4d462f528 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 20:36:55 +0400 Subject: [PATCH 34/92] Add libgl libraries --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 49ebf02a6b9..8e6807b0580 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -66,7 +66,7 @@ jobs: run: | if [ "$RUNNER_OS" == "Linux" ]; then apt-get update -y - apt-get install curl wget libsndfile1 libssl-dev unzip libsqlite3-dev libedit-dev libgl1-mesa-glx -y + apt-get install curl wget libsndfile1 libssl-dev unzip libsqlite3-dev libedit-dev libgl1 libgl1-mesa-glx libglib2.0-0 -y wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh chmod +x ./install_openvino_dependencies.sh ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y From 64ae76027316e8c0cd9c4942c12522daac2ed023 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 20:55:15 +0400 Subject: [PATCH 35/92] Rename cache key --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 8e6807b0580..fbf0af064ca 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -138,7 +138,7 @@ jobs: ${{ env.HUB_HOME }} ${{ env.CACHE_DIR }}/paddle ${{ env.CACHE_DIR }}/ppgan - key: ${{ env.USER_CACHE_KEY }}-${{ runner.os }} + key: ${{ env.USER_CACHE_KEY }}-${{ env.OS_NAME }} - name: Cache openvino packages if: steps.cachepip.outputs.cache-hit != 'true' From f7c06b1925dbb44cf41b35edb1dcfe8e73b95db1 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 21:13:07 +0400 Subject: [PATCH 36/92] Trigger workflow --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index fbf0af064ca..9b0f8795ed3 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -37,7 +37,7 @@ jobs: core.exportVariable('TEST_REPORT_DIR', testReportDir); #### Installation/preparation #### - # + # # These steps are also copied to convert_notebooks.yml - name: Checkout repository uses: actions/checkout@v4 From 00eff462c67e7a56d9199979b5110158a3496b6d Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 21:33:27 +0400 Subject: [PATCH 37/92] Skip set cache dir step --- .github/workflows/build_treon_reusable.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 9b0f8795ed3..641b6ff150d 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -37,7 +37,7 @@ jobs: core.exportVariable('TEST_REPORT_DIR', testReportDir); #### Installation/preparation #### - # + # # These steps are also copied to convert_notebooks.yml - name: Checkout repository uses: actions/checkout@v4 @@ -117,6 +117,8 @@ jobs: # PaddleGAN stores cache in ppgan directory in CACHE_DIR - name: Set CACHE_DIR + # TODO Remove + if: false shell: bash run: | python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' From 4c863eeddf2758f09cce4388ab604a5c0dbea0dc Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 23 May 2024 23:17:05 +0400 Subject: [PATCH 38/92] Comment cache steps --- .github/workflows/build_treon_reusable.yml | 78 +++++++++++----------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 641b6ff150d..e242b34efae 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -90,40 +90,40 @@ jobs: with: python-version: '${{ inputs.python }}' - - name: Cache OpenVINO Pip Packages - id: cachepip - uses: actions/cache@v3 - with: - path: | - pipcache - key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} + # - name: Cache OpenVINO Pip Packages + # id: cachepip + # uses: actions/cache@v3 + # with: + # path: | + # pipcache + # key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} # Cache specific files to reduce downloads or prevent network issues - - name: Cache Files - id: cachefiles - uses: actions/cache@v3 - with: - path: | - # NOTE: when modifying cache paths, update FILES_CACHE_KEY in .env - # and change cache paths in both treon.yml and convert_notebooks.yml - case_00030.zip - notebooks/ct-segmentation-quantize/kits19_frames_1 - notebooks/pytorch-post-training-quantization-nncf/output/tiny-imagenet-200.zip - # omz cache location is set to this with test_replace - notebooks/optical-character-recognition/open_model_zoo_cache - notebooks/ct-scan-live-inference/kits19_frames_1 - notebooks/pytorch-quantization-aware-training/data/tiny-imagenet-200.zip - key: ${{ env.FILES_CACHE_KEY }} + # - name: Cache Files + # id: cachefiles + # uses: actions/cache@v3 + # with: + # path: | + # # NOTE: when modifying cache paths, update FILES_CACHE_KEY in .env + # # and change cache paths in both treon.yml and convert_notebooks.yml + # case_00030.zip + # notebooks/ct-segmentation-quantize/kits19_frames_1 + # notebooks/pytorch-post-training-quantization-nncf/output/tiny-imagenet-200.zip + # # omz cache location is set to this with test_replace + # notebooks/optical-character-recognition/open_model_zoo_cache + # notebooks/ct-scan-live-inference/kits19_frames_1 + # notebooks/pytorch-quantization-aware-training/data/tiny-imagenet-200.zip + # key: ${{ env.FILES_CACHE_KEY }} # PaddleGAN stores cache in ppgan directory in CACHE_DIR - - name: Set CACHE_DIR - # TODO Remove - if: false - shell: bash - run: | - python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' - # replace backslashes with forward slashes for Windows paths - python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' | sed -e 's/\\/\//g' >> $GITHUB_ENV + # - name: Set CACHE_DIR + # # TODO Remove + # if: false + # shell: bash + # run: | + # python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' + # # replace backslashes with forward slashes for Windows paths + # python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' | sed -e 's/\\/\//g' >> $GITHUB_ENV # PaddleHub stores cache in directory pointed to by HUB_HOME environment variable - name: Set HUB_HOME @@ -132,15 +132,15 @@ jobs: echo HUB_HOME=${{ env.CACHE_DIR }}/.paddlehub >> $GITHUB_ENV # Cache PaddlePaddle cache directories to prevent CI failing due to network/download issues - - name: Cache PaddlePaddle cache directories - id: cacheusercache - uses: actions/cache@v3 - with: - path: | - ${{ env.HUB_HOME }} - ${{ env.CACHE_DIR }}/paddle - ${{ env.CACHE_DIR }}/ppgan - key: ${{ env.USER_CACHE_KEY }}-${{ env.OS_NAME }} + # - name: Cache PaddlePaddle cache directories + # id: cacheusercache + # uses: actions/cache@v3 + # with: + # path: | + # ${{ env.HUB_HOME }} + # ${{ env.CACHE_DIR }}/paddle + # ${{ env.CACHE_DIR }}/ppgan + # key: ${{ env.USER_CACHE_KEY }}-${{ env.OS_NAME }} - name: Cache openvino packages if: steps.cachepip.outputs.cache-hit != 'true' From c65d0e839f0ef04d61f00a53be69b8d3b797da64 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 24 May 2024 17:40:16 +0400 Subject: [PATCH 39/92] Uncomment set cache dir step --- .github/workflows/build_treon_reusable.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index e242b34efae..ec940025e70 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -116,14 +116,14 @@ jobs: # key: ${{ env.FILES_CACHE_KEY }} # PaddleGAN stores cache in ppgan directory in CACHE_DIR - # - name: Set CACHE_DIR - # # TODO Remove - # if: false - # shell: bash - # run: | - # python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' - # # replace backslashes with forward slashes for Windows paths - # python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' | sed -e 's/\\/\//g' >> $GITHUB_ENV + - name: Set CACHE_DIR + # TODO Remove + # if: false + shell: bash + run: | + python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' + # replace backslashes with forward slashes for Windows paths + python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' | sed -e 's/\\/\//g' >> $GITHUB_ENV # PaddleHub stores cache in directory pointed to by HUB_HOME environment variable - name: Set HUB_HOME From 797bdf1f11c56fc9c0f43ac42d9c20902045516f Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 24 May 2024 17:51:09 +0400 Subject: [PATCH 40/92] Skip installation of ov dependencies --- .github/workflows/build_treon_reusable.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index ec940025e70..02050c15637 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -67,9 +67,9 @@ jobs: if [ "$RUNNER_OS" == "Linux" ]; then apt-get update -y apt-get install curl wget libsndfile1 libssl-dev unzip libsqlite3-dev libedit-dev libgl1 libgl1-mesa-glx libglib2.0-0 -y - wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh - chmod +x ./install_openvino_dependencies.sh - ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y + # wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh + # chmod +x ./install_openvino_dependencies.sh + # ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y fi - name: Install GPU Drivers From 94b083a43440526d2039b612b561e5af9365df17 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 24 May 2024 18:06:01 +0400 Subject: [PATCH 41/92] Debug printing --- .github/workflows/build_treon_reusable.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 02050c15637..ad417d36ccf 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -67,9 +67,11 @@ jobs: if [ "$RUNNER_OS" == "Linux" ]; then apt-get update -y apt-get install curl wget libsndfile1 libssl-dev unzip libsqlite3-dev libedit-dev libgl1 libgl1-mesa-glx libglib2.0-0 -y - # wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh - # chmod +x ./install_openvino_dependencies.sh - # ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y + wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh + chmod +x ./install_openvino_dependencies.sh + ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y + ldd --version + ls -la /lib/x86_64-linux-gnu/ | grep libc fi - name: Install GPU Drivers From 8630a4e76015b6b1b6093fa7d12b350268bebe0c Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 24 May 2024 22:04:06 +0400 Subject: [PATCH 42/92] Add print python step for debugging --- .github/workflows/build_treon_reusable.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index ad417d36ccf..8d48c571c87 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -92,6 +92,13 @@ jobs: with: python-version: '${{ inputs.python }}' + - name: Print python + shell: bash + run: | + which python + which python3 + echo $RUNNER_OS + # - name: Cache OpenVINO Pip Packages # id: cachepip # uses: actions/cache@v3 From 42997cab6c3ea985afbd62b50ecfdfa00c1a4292 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 24 May 2024 23:51:54 +0400 Subject: [PATCH 43/92] Set agent tools directory env var --- .github/workflows/build_treon_reusable.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 8d48c571c87..2a704c11f57 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -91,6 +91,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: '${{ inputs.python }}' + env: + AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache - name: Print python shell: bash From 122ce6ab446d1ca335b77baf489e99c5ab0ebed4 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Sat, 25 May 2024 00:04:42 +0400 Subject: [PATCH 44/92] Set tools directory for container use case only --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 2a704c11f57..478a9e8fb61 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -92,7 +92,7 @@ jobs: with: python-version: '${{ inputs.python }}' env: - AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache + AGENT_TOOLSDIRECTORY: ${{ inputs.container && '/opt/hostedtoolcache' || '' }} - name: Print python shell: bash From 88e1dce7a16c1c8bc5766ce65d95f1fe81f2ee37 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 27 May 2024 16:18:34 +0400 Subject: [PATCH 45/92] Unskip steps with cache --- .github/workflows/build_treon_reusable.yml | 73 +++++++++------------- 1 file changed, 31 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 478a9e8fb61..b921ef5c578 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -70,8 +70,6 @@ jobs: wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh chmod +x ./install_openvino_dependencies.sh ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y - ldd --version - ls -la /lib/x86_64-linux-gnu/ | grep libc fi - name: Install GPU Drivers @@ -94,42 +92,33 @@ jobs: env: AGENT_TOOLSDIRECTORY: ${{ inputs.container && '/opt/hostedtoolcache' || '' }} - - name: Print python - shell: bash - run: | - which python - which python3 - echo $RUNNER_OS - - # - name: Cache OpenVINO Pip Packages - # id: cachepip - # uses: actions/cache@v3 - # with: - # path: | - # pipcache - # key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} + - name: Cache OpenVINO Pip Packages + id: cachepip + uses: actions/cache@v3 + with: + path: | + pipcache + key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} # Cache specific files to reduce downloads or prevent network issues - # - name: Cache Files - # id: cachefiles - # uses: actions/cache@v3 - # with: - # path: | - # # NOTE: when modifying cache paths, update FILES_CACHE_KEY in .env - # # and change cache paths in both treon.yml and convert_notebooks.yml - # case_00030.zip - # notebooks/ct-segmentation-quantize/kits19_frames_1 - # notebooks/pytorch-post-training-quantization-nncf/output/tiny-imagenet-200.zip - # # omz cache location is set to this with test_replace - # notebooks/optical-character-recognition/open_model_zoo_cache - # notebooks/ct-scan-live-inference/kits19_frames_1 - # notebooks/pytorch-quantization-aware-training/data/tiny-imagenet-200.zip - # key: ${{ env.FILES_CACHE_KEY }} + - name: Cache Files + id: cachefiles + uses: actions/cache@v3 + with: + path: | + # NOTE: when modifying cache paths, update FILES_CACHE_KEY in .env + # and change cache paths in both treon.yml and convert_notebooks.yml + case_00030.zip + notebooks/ct-segmentation-quantize/kits19_frames_1 + notebooks/pytorch-post-training-quantization-nncf/output/tiny-imagenet-200.zip + # omz cache location is set to this with test_replace + notebooks/optical-character-recognition/open_model_zoo_cache + notebooks/ct-scan-live-inference/kits19_frames_1 + notebooks/pytorch-quantization-aware-training/data/tiny-imagenet-200.zip + key: ${{ env.FILES_CACHE_KEY }} # PaddleGAN stores cache in ppgan directory in CACHE_DIR - name: Set CACHE_DIR - # TODO Remove - # if: false shell: bash run: | python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' @@ -143,15 +132,15 @@ jobs: echo HUB_HOME=${{ env.CACHE_DIR }}/.paddlehub >> $GITHUB_ENV # Cache PaddlePaddle cache directories to prevent CI failing due to network/download issues - # - name: Cache PaddlePaddle cache directories - # id: cacheusercache - # uses: actions/cache@v3 - # with: - # path: | - # ${{ env.HUB_HOME }} - # ${{ env.CACHE_DIR }}/paddle - # ${{ env.CACHE_DIR }}/ppgan - # key: ${{ env.USER_CACHE_KEY }}-${{ env.OS_NAME }} + - name: Cache PaddlePaddle cache directories + id: cacheusercache + uses: actions/cache@v3 + with: + path: | + ${{ env.HUB_HOME }} + ${{ env.CACHE_DIR }}/paddle + ${{ env.CACHE_DIR }}/ppgan + key: ${{ env.USER_CACHE_KEY }}-${{ env.OS_NAME }} - name: Cache openvino packages if: steps.cachepip.outputs.cache-hit != 'true' From 10b20fcd6cf6e658a720969bcb267fa115ef2b6e Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 27 May 2024 16:20:57 +0400 Subject: [PATCH 46/92] Limit testing notebooks to 3 items --- .ci/validate_notebooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/validate_notebooks.py b/.ci/validate_notebooks.py index 6c6e599a83c..f180e967a7b 100644 --- a/.ci/validate_notebooks.py +++ b/.ci/validate_notebooks.py @@ -122,9 +122,9 @@ def prepare_test_plan(test_list: Optional[List[str]], ignore_list: List[str], nb "Testing notebooks should be provided to '--test_list' argument as a txt file or should be empty to test all notebooks.\n" f"Received test list: {test_list}" ) - testing_notebooks = sorted(list(set(testing_notebooks))) + # testing_notebooks = sorted(list(set(testing_notebooks))) # TODO Remove after testing - testing_notebooks = testing_notebooks[:1] + testing_notebooks = testing_notebooks[:3] print(f"Testing notebooks: {testing_notebooks}") for notebook in test_plan: From e53846b974917110c08a174859f58fefd2a21a1f Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 27 May 2024 17:12:31 +0400 Subject: [PATCH 47/92] Use latest dotenv actions --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index b921ef5c578..c6851cd23a2 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -44,7 +44,7 @@ jobs: - name: Dotenv Action id: dotenv - uses: xom9ikk/dotenv@v1.0.2 + uses: xom9ikk/dotenv@v2.3.0 with: path: ./.github/workflows From d037853ab1a8a81a6459e2d0c7fc9c8fd7af033f Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 27 May 2024 17:23:28 +0400 Subject: [PATCH 48/92] Update notebooks status interface with device level --- selector/src/shared/notebook-status.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/selector/src/shared/notebook-status.ts b/selector/src/shared/notebook-status.ts index 98b2a443e17..07113c5c319 100644 --- a/selector/src/shared/notebook-status.ts +++ b/selector/src/shared/notebook-status.ts @@ -1,5 +1,7 @@ type ValidatedOS = 'ubuntu-20.04' | 'ubuntu-22.04' | 'windows-2019' | 'macos-12'; +type ValidatedDevice = 'cpu' | 'gpu'; + type ValidatedPythonVersion = '3.8' | '3.9' | '3.10'; export enum ValidationStatus { @@ -15,7 +17,9 @@ export interface INotebookStatus { name: string; status: { [OS in ValidatedOS]: { - [PythonVersion in ValidatedPythonVersion]: ValidationStatus | null; + [Device in ValidatedDevice]: { + [PythonVersion in ValidatedPythonVersion]: ValidationStatus | null; + }; }; }; } From d0f5385dcbe36a3d6884b981cc56a06f831f1825 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 27 May 2024 17:25:10 +0400 Subject: [PATCH 49/92] Add gpu statuses to table --- .../NotebookCard/StatusTable/StatusTable.scss | 49 +++++++++++++----- .../NotebookCard/StatusTable/StatusTable.tsx | 50 ++++++++++++------- 2 files changed, 70 insertions(+), 29 deletions(-) diff --git a/selector/src/components/ContentSection/NotebooksList/NotebookCard/StatusTable/StatusTable.scss b/selector/src/components/ContentSection/NotebooksList/NotebookCard/StatusTable/StatusTable.scss index 3fabf507ece..d35a69489b7 100644 --- a/selector/src/components/ContentSection/NotebooksList/NotebookCard/StatusTable/StatusTable.scss +++ b/selector/src/components/ContentSection/NotebooksList/NotebookCard/StatusTable/StatusTable.scss @@ -36,16 +36,16 @@ border: 1px solid var(--table-border-color); border-bottom: 0; display: grid; - grid-template-columns: auto repeat(3, auto); + grid-template-columns: auto repeat(6, auto); grid-template-rows: repeat(6, 1fr); grid-auto-flow: row; grid-template-areas: - 'os-header device-header device-header device-header' - 'os-header python-versions python-versions python-versions' - 'os-names statuses statuses statuses' - 'os-names statuses statuses statuses' - 'os-names statuses statuses statuses' - 'os-names statuses statuses statuses'; + 'os-header cpu-device-header cpu-device-header cpu-device-header gpu-device-header gpu-device-header gpu-device-header' + 'os-header cpu-python-versions cpu-python-versions cpu-python-versions gpu-python-versions gpu-python-versions gpu-python-versions' + 'os-names cpu-statuses cpu-statuses cpu-statuses gpu-statuses gpu-statuses gpu-statuses' + 'os-names cpu-statuses cpu-statuses cpu-statuses gpu-statuses gpu-statuses gpu-statuses' + 'os-names cpu-statuses cpu-statuses cpu-statuses gpu-statuses gpu-statuses gpu-statuses' + 'os-names cpu-statuses cpu-statuses cpu-statuses gpu-statuses gpu-statuses gpu-statuses'; .cell { display: flex; @@ -70,29 +70,48 @@ .os-header, .os-names { - border-right: 1px solid var(--table-border-color); - .cell { padding-left: 1rem; padding-right: 1rem; } } +.cpu-device-header { + grid-area: cpu-device-header; +} + +.gpu-device-header { + grid-area: gpu-device-header; +} + .device-header { - grid-area: device-header; font-weight: 500; } +.cpu-python-versions { + grid-area: cpu-python-versions; +} + +.gpu-python-versions { + grid-area: gpu-python-versions; +} + .python-versions { - grid-area: python-versions; font-weight: 500; display: grid; grid-template-columns: subgrid; border-bottom: 1px solid var(--table-border-color); } +.cpu-statuses { + grid-area: cpu-statuses; +} + +.gpu-statuses { + grid-area: gpu-statuses; +} + .statuses { - grid-area: statuses; display: grid; grid-template-columns: subgrid; grid-template-rows: subgrid; @@ -112,3 +131,9 @@ border-bottom: 1px solid var(--table-border-color); } } + +.device-header, +.python-versions, +.statuses { + border-left: 1px solid var(--table-border-color); +} diff --git a/selector/src/components/ContentSection/NotebooksList/NotebookCard/StatusTable/StatusTable.tsx b/selector/src/components/ContentSection/NotebooksList/NotebookCard/StatusTable/StatusTable.tsx index 5c2e46bf5cb..c04ff508075 100644 --- a/selector/src/components/ContentSection/NotebooksList/NotebookCard/StatusTable/StatusTable.tsx +++ b/selector/src/components/ContentSection/NotebooksList/NotebookCard/StatusTable/StatusTable.tsx @@ -41,33 +41,42 @@ const getStatusIcon = (status: ValidationStatus | null): JSX.Element => { return N/A; }; +const pythonVersionsCells = ( + <> +
+ + 3.8 +
+
+ + 3.9 +
+
+ + 3.10 +
+ +); + type StatusTableProps = { status: NonNullable; }; export const StatusTable = ({ status }: StatusTableProps) => { const osOptions = Object.keys(status) as (keyof typeof status)[]; - const statuses = osOptions.map((os) => Object.values(status[os])); + const cpuStatuses = osOptions.map((os) => Object.values(status[os]['cpu'])); + const gpuStatuses = osOptions.map((os) => Object.values(status[os]['gpu'])); return (
-
+
CPU
-
-
- - 3.8 -
-
- - 3.9 -
-
- - 3.10 -
+
+
GPU
+
{pythonVersionsCells}
+
{pythonVersionsCells}
OS
@@ -78,13 +87,20 @@ export const StatusTable = ({ status }: StatusTableProps) => {
))}
-
- {statuses.flat().map((v, i) => ( +
+ {cpuStatuses.flat().map((v, i) => (
{getStatusIcon(v)}
))}
+
+ {gpuStatuses.flat().map((v, i) => ( +
+ {getStatusIcon(v)} +
+ ))} +
); }; From fb229fbf48cc39ead8181c3c92afc6434ac2f216 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 27 May 2024 17:25:49 +0400 Subject: [PATCH 50/92] Add test prefix to aggregated report file --- .ci/aggregate_notebooks_reports.py | 3 ++- selector/src/shared/constants.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.ci/aggregate_notebooks_reports.py b/.ci/aggregate_notebooks_reports.py index 434d530e3ad..7d55ebb690a 100644 --- a/.ci/aggregate_notebooks_reports.py +++ b/.ci/aggregate_notebooks_reports.py @@ -59,7 +59,8 @@ def main(): if name not in NOTEBOOKS_STATUS_MAP: NOTEBOOKS_STATUS_MAP[name] = get_default_status_dict(name) NOTEBOOKS_STATUS_MAP[name]["status"][os][device][python] = status - write_json_file(Path(REPORTS_DIR) / "notebooks-status-map.json", NOTEBOOKS_STATUS_MAP) + # TODO Remove test prefix aftertesting + write_json_file(Path(REPORTS_DIR) / "test-notebooks-status-map.json", NOTEBOOKS_STATUS_MAP) if __name__ == "__main__": diff --git a/selector/src/shared/constants.js b/selector/src/shared/constants.js index 1b137960d6c..e2ba928a7ff 100644 --- a/selector/src/shared/constants.js +++ b/selector/src/shared/constants.js @@ -1,4 +1,4 @@ // @ts-check export const NOTEBOOKS_METADATA_FILE_NAME = 'notebooks-metadata-map.json'; -export const NOTEBOOKS_STATUS_FILE_NAME = 'notebooks-status-map.json'; +export const NOTEBOOKS_STATUS_FILE_NAME = 'test-notebooks-status-map.json'; // TODO Remove 'test-' prefix after testing From af258199fef4a32beb6cf7dd7a6d446581b04a02 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 27 May 2024 17:27:46 +0400 Subject: [PATCH 51/92] Enable aggregate reports step --- .github/workflows/treon.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/treon.yml b/.github/workflows/treon.yml index 85b5b468f0a..966760ae9f5 100644 --- a/.github/workflows/treon.yml +++ b/.github/workflows/treon.yml @@ -48,9 +48,7 @@ jobs: container: ${{ matrix.container }} aggregate_notebooks_reports: - # if: always() - # TODO Remove after testing - if: false + if: always() runs-on: ubuntu-20.04 needs: [build_treon_cpu, build_treon_gpu] steps: @@ -74,5 +72,5 @@ jobs: with: # TODO Remove after testing name: test-notebooks-status-map.json - path: test_reports/notebooks-status-map.json + path: test_reports/test-notebooks-status-map.json if-no-files-found: error From 486cccbe12beac2cd6c3ce33064790fedeed55ed Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 27 May 2024 18:23:43 +0400 Subject: [PATCH 52/92] Remove limitation of testing notebooks --- .ci/validate_notebooks.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.ci/validate_notebooks.py b/.ci/validate_notebooks.py index f180e967a7b..332ded92991 100644 --- a/.ci/validate_notebooks.py +++ b/.ci/validate_notebooks.py @@ -122,9 +122,7 @@ def prepare_test_plan(test_list: Optional[List[str]], ignore_list: List[str], nb "Testing notebooks should be provided to '--test_list' argument as a txt file or should be empty to test all notebooks.\n" f"Received test list: {test_list}" ) - # testing_notebooks = sorted(list(set(testing_notebooks))) - # TODO Remove after testing - testing_notebooks = testing_notebooks[:3] + testing_notebooks = sorted(list(set(testing_notebooks))) print(f"Testing notebooks: {testing_notebooks}") for notebook in test_plan: From 85db38069adcc4f5dbef397fdcdfcb5b55e4df20 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Tue, 28 May 2024 15:45:36 +0400 Subject: [PATCH 53/92] Add todo --- .github/workflows/build_treon_reusable.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index c6851cd23a2..e72961bf6a4 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -3,6 +3,7 @@ name: Build Treon Reusable Workflow on: workflow_call: inputs: + # TODO Add input for testing only changed notebooks (for precommit usage) runs_on: required: true type: string From 31451a4a33df6f9342dff4feb73ec237032d7d49 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Tue, 28 May 2024 16:04:42 +0400 Subject: [PATCH 54/92] Update dotenv action version --- .github/workflows/codecheck.yml | 2 +- .github/workflows/convert_notebooks.yml | 2 +- .github/workflows/generate_tags.yml | 2 +- .github/workflows/install_requirements.yml | 2 +- .github/workflows/pip_conflicts_check.yml | 2 +- .github/workflows/spellcheck.yml | 2 +- .github/workflows/treon_precommit.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codecheck.yml b/.github/workflows/codecheck.yml index eb70a923885..5e4a876aac9 100644 --- a/.github/workflows/codecheck.yml +++ b/.github/workflows/codecheck.yml @@ -35,7 +35,7 @@ jobs: uses: actions/checkout@v4 - name: Dotenv Action id: dotenv - uses: xom9ikk/dotenv@v1.0.2 + uses: xom9ikk/dotenv@v2.3.0 with: path: ./.github/workflows - name: Set up Python diff --git a/.github/workflows/convert_notebooks.yml b/.github/workflows/convert_notebooks.yml index 1c181d2041c..c7ecfd37e75 100644 --- a/.github/workflows/convert_notebooks.yml +++ b/.github/workflows/convert_notebooks.yml @@ -62,7 +62,7 @@ jobs: uses: actions/checkout@v4 - name: Dotenv Action id: dotenv - uses: xom9ikk/dotenv@v1.0.2 + uses: xom9ikk/dotenv@v2.3.0 with: path: ./.github/workflows - name: Set up Python diff --git a/.github/workflows/generate_tags.yml b/.github/workflows/generate_tags.yml index 6bd25cf113d..a630fa31cbc 100644 --- a/.github/workflows/generate_tags.yml +++ b/.github/workflows/generate_tags.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: Dotenv Action id: dotenv - uses: xom9ikk/dotenv@v1.0.2 + uses: xom9ikk/dotenv@v2.3.0 with: path: ./.github/workflows - name: Set up Python diff --git a/.github/workflows/install_requirements.yml b/.github/workflows/install_requirements.yml index 06e2d9e19be..bdcfba69114 100644 --- a/.github/workflows/install_requirements.yml +++ b/.github/workflows/install_requirements.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - name: Dotenv Action id: dotenv - uses: xom9ikk/dotenv@v1.0.2 + uses: xom9ikk/dotenv@v2.3.0 with: path: ./.github/workflows - name: Set up Python diff --git a/.github/workflows/pip_conflicts_check.yml b/.github/workflows/pip_conflicts_check.yml index 314a1879e30..fde0f2b2b10 100644 --- a/.github/workflows/pip_conflicts_check.yml +++ b/.github/workflows/pip_conflicts_check.yml @@ -24,7 +24,7 @@ jobs: - name: Dotenv Action id: dotenv - uses: xom9ikk/dotenv@v1.0.2 + uses: xom9ikk/dotenv@v2.3.0 with: path: ./.github/workflows diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index a32553a4197..1888516d391 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -34,7 +34,7 @@ jobs: - name: Dotenv Action id: dotenv - uses: xom9ikk/dotenv@v1.0.2 + uses: xom9ikk/dotenv@v2.3.0 with: path: ./.github/workflows diff --git a/.github/workflows/treon_precommit.yml b/.github/workflows/treon_precommit.yml index 30727eee208..cb7b170436d 100644 --- a/.github/workflows/treon_precommit.yml +++ b/.github/workflows/treon_precommit.yml @@ -69,7 +69,7 @@ jobs: shell: bash - name: Dotenv Action id: dotenv - uses: xom9ikk/dotenv@v1.0.2 + uses: xom9ikk/dotenv@v2.3.0 with: path: ./.github/workflows - name: Install required packages From 6b1cdded3df4d921252deb979e7bdd09954ed3fb Mon Sep 17 00:00:00 2001 From: yatarkan Date: Tue, 28 May 2024 17:41:20 +0400 Subject: [PATCH 55/92] Add input for testing only changed notebooks --- .github/workflows/build_treon_reusable.yml | 64 +++++++++++++++++++--- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index e72961bf6a4..56d08d07a5a 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -3,7 +3,6 @@ name: Build Treon Reusable Workflow on: workflow_call: inputs: - # TODO Add input for testing only changed notebooks (for precommit usage) runs_on: required: true type: string @@ -14,6 +13,10 @@ on: required: false type: string default: null + test_only_changed: + required: false + type: boolean + default: false jobs: build_treon: @@ -37,6 +40,27 @@ jobs: core.exportVariable('TEST_DEVICE', testDevice); core.exportVariable('TEST_REPORT_DIR', testReportDir); + - name: Get changed files + if: ${{ inputs.test_only_changed }} + id: changed-files + uses: tj-actions/changed-files@v44 + with: + files: | + notebooks/*/** + requirements.txt + + - name: List all changed files + if: ${{ inputs.test_only_changed }} + shell: bash + run: | + touch test_notebooks.txt + changed_files="${{ steps.changed-files.outputs.all_changed_files }}" + changed_files=$(echo $changed_files | tr '\\' '/') + for file in $changed_files; do + echo "$file was changed" + echo $file >> test_notebooks.txt + done + #### Installation/preparation #### # # These steps are also copied to convert_notebooks.yml @@ -221,32 +245,58 @@ jobs: if: runner.os == 'Windows' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --move_notebooks_dir c:/notebooks --timeout 1200 + python .ci/validate_notebooks.py \ + ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ + --ignore_list .ci/ignore_treon_win.txt \ + --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ + --move_notebooks_dir c:/notebooks \ + --timeout 1200 - name: Analysing with treon (Windows) python 3.8 if: runner.os == 'Windows' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --move_notebooks_dir c:/notebooks --timeout 1200 + python .ci/validate_notebooks.py \ + ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ + --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt \ + --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ + --move_notebooks_dir c:/notebooks \ + --timeout 1200 - name: Analysing with treon (Linux) python > 3.8 if: runner.os == 'Linux' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --timeout 1200 + python .ci/validate_notebooks.py \ + ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ + --ignore_list .ci/ignore_treon_linux.txt \ + --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ + --timeout 1200 - name: Analysing with treon (Linux) python 3.8 if: runner.os == 'Linux' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --timeout 1200 + python .ci/validate_notebooks.py + ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ + --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt \ + --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ + --timeout 1200 - name: Analysing with treon (MacOS) python > 3.8 if: runner.os == 'MacOS' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --timeout 1200 + python .ci/validate_notebooks.py + ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ + --ignore_list .ci/ignore_treon_mac.txt \ + --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ + --timeout 1200 - name: Analysing with treon (MacOS) python 3.8 if: runner.os == 'MacOS' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{ env.TEST_REPORT_DIR }} --timeout 1200 + python .ci/validate_notebooks.py + ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ + --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt \ + --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ + --timeout 1200 - name: Archive notebook test report if: always() From c5a219073a1761070605728ca9b465551b2bf977 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Tue, 28 May 2024 17:46:14 +0400 Subject: [PATCH 56/92] Reuse build treon workflow for precommit --- .github/workflows/treon_precommit.yml | 221 +------------------------- 1 file changed, 6 insertions(+), 215 deletions(-) diff --git a/.github/workflows/treon_precommit.yml b/.github/workflows/treon_precommit.yml index cb7b170436d..3c822dfb5b8 100644 --- a/.github/workflows/treon_precommit.yml +++ b/.github/workflows/treon_precommit.yml @@ -33,222 +33,13 @@ jobs: build_treon: # TODO Remove after testing if: false - runs-on: ${{ matrix.os }} strategy: fail-fast: true matrix: - os: [ubuntu-20.04, windows-2019, macos-12] + runs_on: [ubuntu-20.04, windows-2019, macos-12] python: ['3.10', '3.9', '3.8'] - steps: - #### Installation/preparation #### - # - # These steps are also copied to convert_notebooks.yml - - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v44 - with: - files: | - notebooks/*/** - requirements.txt - - - name: List all changed files - run: | - touch test_notebooks.txt - changed_files="${{ steps.changed-files.outputs.all_changed_files }}" - changed_files=$(echo $changed_files | tr '\\' '/') - for file in $changed_files; do - echo "$file was changed" - echo $file >> test_notebooks.txt - done - shell: bash - - name: Dotenv Action - id: dotenv - uses: xom9ikk/dotenv@v2.3.0 - with: - path: ./.github/workflows - - name: Install required packages - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt-get install libsndfile1 -y - fi - shell: bash - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - - - name: Cache OpenVINO Pip Packages - id: cachepip - uses: actions/cache@v3 - with: - path: | - pipcache - key: ${{ env.PIP_CACHE_KEY }}-${{ matrix.os }}-${{ matrix.python }} - - # Cache specific files to reduce downloads or prevent network issues - - name: Cache Files - id: cachefiles - uses: actions/cache@v3 - with: - path: | - # NOTE: when modifying cache paths, update FILES_CACHE_KEY in .env - # and change cache paths in both treon.yml and convert_notebooks.yml - case_00030.zip - notebooks/ct-segmentation-quantize/kits19_frames_1 - notebooks/pytorch-post-training-quantization-nncf/output/tiny-imagenet-200.zip - # omz cache location is set to this with test_replace - notebooks/optical-character-recognition/open_model_zoo_cache - notebooks/ct-scan-live-inference/kits19_frames_1 - notebooks/pytorch-quantization-aware-training/data/tiny-imagenet-200.zip - key: ${{ env.FILES_CACHE_KEY }} - - # PaddleGAN stores cache in ppgan directory in CACHE_DIR - - name: Set CACHE_DIR - shell: bash - run: | - python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' - # replace backslashes with forward slashes for Windows paths - python -c 'import os;print("CACHE_DIR={0}".format(os.path.expanduser(os.path.join("~", ".cache"))))' | sed -e 's/\\/\//g' >> $GITHUB_ENV - - # PaddleHub stores cache in directory pointed to by HUB_HOME environment variable - - name: Set HUB_HOME - shell: bash - run: | - echo HUB_HOME=${{ env.CACHE_DIR }}/.paddlehub >> $GITHUB_ENV - - # Cache PaddlePaddle cache directories to prevent CI failing due to network/download issues - - name: Cache PaddlePaddle cache directories - id: cacheusercache - uses: actions/cache@v3 - with: - path: | - ${{ env.HUB_HOME }} - ${{ env.CACHE_DIR }}/paddle - ${{ env.CACHE_DIR }}/ppgan - key: ${{ env.USER_CACHE_KEY }}-${{ runner.os }} - - name: Cache openvino packages - if: steps.cachepip.outputs.cache-hit != 'true' - run: | - python -m pip install --upgrade pip - mkdir pipcache - python -m pip install --cache-dir pipcache --no-deps openvino openvino-dev nncf - cp -r pipcache pipcache_openvino - python -m pip uninstall -y openvino openvino-dev nncf - - # Download a small dataset to use for testing purposes in monai-kidney training notebook - - name: Download CT files - if: steps.cachefiles.outputs.cache-hit != 'true' - run: | - curl -O https://storage.openvinotoolkit.org/data/test_data/openvino_notebooks/kits19/case_00030.zip - - name: Copy CT files - run: | - mkdir notebooks/ct-segmentation-quantize/kits19 - mkdir notebooks/ct-segmentation-quantize/kits19/kits19_frames - unzip case_00030.zip - cp -r case_00030 case_00001 - mv case_00030 notebooks/ct-segmentation-quantize/kits19/kits19_frames - mv case_00001 notebooks/ct-segmentation-quantize/kits19/kits19_frames - # Prevent test aborting by timeout - - name: Download long loading models - run: | - mkdir notebooks/meter-reader/model - curl -o notebooks/meter-reader/model/meter_det_model.tar.gz 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/meter-reader/meter_det_model.tar.gz' - curl -o notebooks/meter-reader/model/meter_seg_model.tar.gz 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/meter-reader/meter_seg_model.tar.gz' - mkdir notebooks/paddle-ocr-webcam/model - curl -o notebooks/paddle-ocr-webcam/model/ch_PP-OCRv3_det_infer.tar 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/paddle-ocr/ch_PP-OCRv3_det_infer.tar' - curl -o notebooks/paddle-ocr-webcam/model/ch_PP-OCRv3_rec_infer.tar 'https://storage.openvinotoolkit.org/repositories/openvino_notebooks/models/paddle-ocr/ch_PP-OCRv3_rec_infer.tar' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r .ci/dev-requirements.txt --cache-dir pipcache - python -m ipykernel install --user --name openvino_env - - # Cache OpenVINO packages. mv works cross-platform - - name: Make pipcache directory with OpenVINO packages - if: steps.cachepip.outputs.cache-hit != 'true' - run: | - mv pipcache pipcache_full - mv pipcache_openvino pipcache - - # Create list of installed pip packages that can be downloaded as artifacts - # to verify the exact environment of a specific test run - - name: Pip freeze - run: | - python -m pip freeze - python -m pip freeze > pip-freeze-${{ github.sha }}-${{matrix.os}}-${{ matrix.python }}.txt - - name: Archive pip freeze - uses: actions/upload-artifact@v4 - with: - name: pip-freeze-${{matrix.os}}-${{ matrix.python }} - path: pip-freeze-${{ github.sha }}-${{matrix.os}}-${{ matrix.python }}.txt - - #### End installation/preparation - - - name: Check install - run: | - python check_install.py - - # Patch long running cells to run faster - - name: Patch notebooks - run: | - python .ci/patch_notebooks.py . - - # Test that JupyterLab runs without errors - - name: Test Jupyterlab - run: | - jupyter lab notebooks --help - - # Main notebooks test. Verifies that all notebooks run without errors - - name: Analysing with treon (Windows) python > 3.8 - if: runner.os == 'Windows' && matrix.python != '3.8' - run: | - python .ci/validate_notebooks.py --test_list test_notebooks.txt --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} --move_notebooks_dir c:/notebooks - shell: bash - - name: Analysing with treon (Windows) python 3.8 - if: runner.os == 'Windows' && matrix.python == '3.8' - run: | - python .ci/validate_notebooks.py --test_list test_notebooks.txt --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} --move_notebooks_dir c:/notebooks - shell: bash - - name: Analysing with treon (Linux) python > 3.8 - if: runner.os == 'Linux' && matrix.python != '3.8' - run: | - python .ci/validate_notebooks.py --test_list test_notebooks.txt --ignore_list .ci/ignore_treon_linux.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} - shell: bash - - name: Analysing with treon (Linux) python 3.8 - if: runner.os == 'Linux' && matrix.python == '3.8' - run: | - python .ci/validate_notebooks.py --test_list test_notebooks.txt --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} - shell: bash - - name: Analysing with treon (MacOS) python > 3.8 - if: runner.os == 'MacOS' && matrix.python != '3.8' - run: | - python .ci/validate_notebooks.py --test_list test_notebooks.txt --ignore_list .ci/ignore_treon_mac.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} - shell: bash - - name: Analysing with treon (MacOS) python 3.8 - if: runner.os == 'MacOS' && matrix.python == '3.8' - run: | - python .ci/validate_notebooks.py --test_list test_notebooks.txt --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} - shell: bash - - name: Archive test report - uses: actions/upload-artifact@v4 - with: - name: test_report.csv-${{matrix.os}}-${{ matrix.python }} - path: test_report.csv - - name: Archive notebook test report - uses: actions/upload-artifact@v4 - with: - name: test_report-${{matrix.os}}-${{ matrix.python }} - path: test_report/ - - # Show the cache after running the notebooks - - name: Show cache - run: | - ls -laR ${{ env.CACHE_DIR }} - du -sh ${{ env.CACHE_DIR }} - if: runner.os != 'Windows' + uses: ./.github/workflows/build_treon_reusable.yml + with: + runs_on: ${{ matrix.runs_on }} + python: ${{ matrix.python }} + test_only_changed: true From 3dfd1b273896e4c015588bf24fe46617e9937f8c Mon Sep 17 00:00:00 2001 From: yatarkan Date: Tue, 28 May 2024 17:57:07 +0400 Subject: [PATCH 57/92] Add heavy ubuntu gpu notebooks to validation ignore list --- .github/workflows/build_treon_reusable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 56d08d07a5a..84e582456cf 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -267,7 +267,7 @@ jobs: run: | python .ci/validate_notebooks.py \ ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ - --ignore_list .ci/ignore_treon_linux.txt \ + --ignore_list .ci/ignore_treon_linux.txt ${{ env.TEST_DEVICE == 'gpu' && '.ci/heavy_ubuntu_gpu' || '' }} \ --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ --timeout 1200 - name: Analysing with treon (Linux) python 3.8 @@ -276,7 +276,7 @@ jobs: run: | python .ci/validate_notebooks.py ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ - --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt \ + --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt ${{ env.TEST_DEVICE == 'gpu' && '.ci/heavy_ubuntu_gpu' || '' }} \ --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ --timeout 1200 - name: Analysing with treon (MacOS) python > 3.8 From 9a388a1c00f3c520bbbca797da485212c75dd2c4 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Tue, 28 May 2024 18:22:48 +0400 Subject: [PATCH 58/92] Fix heavy ubuntu gpu file name --- .github/workflows/build_treon_reusable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 84e582456cf..3f82d04187e 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -267,7 +267,7 @@ jobs: run: | python .ci/validate_notebooks.py \ ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ - --ignore_list .ci/ignore_treon_linux.txt ${{ env.TEST_DEVICE == 'gpu' && '.ci/heavy_ubuntu_gpu' || '' }} \ + --ignore_list .ci/ignore_treon_linux.txt ${{ env.TEST_DEVICE == 'gpu' && '.ci/heavy_ubuntu_gpu.txt' || '' }} \ --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ --timeout 1200 - name: Analysing with treon (Linux) python 3.8 @@ -276,7 +276,7 @@ jobs: run: | python .ci/validate_notebooks.py ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ - --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt ${{ env.TEST_DEVICE == 'gpu' && '.ci/heavy_ubuntu_gpu' || '' }} \ + --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt ${{ env.TEST_DEVICE == 'gpu' && '.ci/heavy_ubuntu_gpu.txt' || '' }} \ --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ --timeout 1200 - name: Analysing with treon (MacOS) python > 3.8 From 69ffa1f953e306ecb49c4fa3ab51930cec16ad8f Mon Sep 17 00:00:00 2001 From: yatarkan Date: Tue, 28 May 2024 19:04:15 +0400 Subject: [PATCH 59/92] Fix commant new line wrap --- .github/workflows/build_treon_reusable.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 3f82d04187e..3f1e8ed697c 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -274,7 +274,7 @@ jobs: if: runner.os == 'Linux' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py + python .ci/validate_notebooks.py \ ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ --ignore_list .ci/ignore_treon_linux.txt .ci/ignore_treon_py38.txt ${{ env.TEST_DEVICE == 'gpu' && '.ci/heavy_ubuntu_gpu.txt' || '' }} \ --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ @@ -283,7 +283,7 @@ jobs: if: runner.os == 'MacOS' && inputs.python != '3.8' shell: bash run: | - python .ci/validate_notebooks.py + python .ci/validate_notebooks.py \ ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ --ignore_list .ci/ignore_treon_mac.txt \ --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ @@ -292,7 +292,7 @@ jobs: if: runner.os == 'MacOS' && inputs.python == '3.8' shell: bash run: | - python .ci/validate_notebooks.py + python .ci/validate_notebooks.py \ ${{ inputs.test_only_changed && '--test_list test_notebooks.txt' || '' }} \ --ignore_list .ci/ignore_treon_mac.txt .ci/ignore_treon_py38.txt \ --report_dir test_report/${{ env.TEST_REPORT_DIR }} \ From 12439bd4d1596262041f6179c0e823a4a134cd01 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 29 May 2024 00:35:05 +0400 Subject: [PATCH 60/92] Set GIT_CLONE_PROTECTION_ACTIVE env var --- .github/workflows/build_treon_reusable.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 3f1e8ed697c..e94c140860e 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -39,6 +39,7 @@ jobs: core.exportVariable('OS_NAME', osName); core.exportVariable('TEST_DEVICE', testDevice); core.exportVariable('TEST_REPORT_DIR', testReportDir); + core.exportVariable('GIT_CLONE_PROTECTION_ACTIVE', 'false'); - name: Get changed files if: ${{ inputs.test_only_changed }} From 0ab26310c46301b0d5d7155b0d1d09db8e1ffb64 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 29 May 2024 15:45:36 +0400 Subject: [PATCH 61/92] Check git version --- .github/workflows/build_treon_reusable.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index e94c140860e..fdbd7989648 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -83,6 +83,13 @@ jobs: sudo apt-get install libsndfile1 -y fi + # TODO Remove + - name: Check Git + shell: bash + run: | + git --version + which git + - name: Install required packages (container) if: ${{ inputs.container }} shell: bash @@ -96,8 +103,16 @@ jobs: wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh chmod +x ./install_openvino_dependencies.sh ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y + apt-get install git fi + # TODO Remove + - name: Install Git + shell: bash + run: | + git --version + which git + - name: Install GPU Drivers if: ${{ inputs.container }} shell: bash From 203f866bcaa6543414addbe2e077b5897b47dc28 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Wed, 29 May 2024 16:02:03 +0400 Subject: [PATCH 62/92] Add git install for container --- .github/workflows/build_treon_reusable.yml | 24 ++++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index fdbd7989648..0b9aa1a3646 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -79,17 +79,10 @@ jobs: shell: bash run: | if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt-get update -y - sudo apt-get install libsndfile1 -y + sudo apt-get update -y + sudo apt-get install libsndfile1 -y fi - # TODO Remove - - name: Check Git - shell: bash - run: | - git --version - which git - - name: Install required packages (container) if: ${{ inputs.container }} shell: bash @@ -98,16 +91,15 @@ jobs: TZ: 'Europe/London' # to prevent tzdata from waiting user input run: | if [ "$RUNNER_OS" == "Linux" ]; then - apt-get update -y - apt-get install curl wget libsndfile1 libssl-dev unzip libsqlite3-dev libedit-dev libgl1 libgl1-mesa-glx libglib2.0-0 -y - wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh - chmod +x ./install_openvino_dependencies.sh - ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y - apt-get install git + apt-get update -y + apt-get install git curl wget libsndfile1 libssl-dev unzip libsqlite3-dev libedit-dev libgl1 libgl1-mesa-glx libglib2.0-0 -y + wget https://raw.githubusercontent.com/openvinotoolkit/openvino/master/scripts/install_dependencies/install_openvino_dependencies.sh + chmod +x ./install_openvino_dependencies.sh + ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y fi # TODO Remove - - name: Install Git + - name: Check Git shell: bash run: | git --version From 60b6248c657e37687edf3c2bc612162cacc471ae Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 30 May 2024 15:27:15 +0400 Subject: [PATCH 63/92] Add printing of available devices --- .github/workflows/build_treon_reusable.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 0b9aa1a3646..e3028eb2066 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -238,6 +238,11 @@ jobs: run: | python check_install.py + # TODO Remove after testing + - name: Print devices + run: | + python -c 'import openvino as ov;print(ov.Core().available_devices)' + # Patch long running cells to run faster - name: Patch notebooks run: | From 3cccbfaad518d7d8141fc7dec3cc097a0347e3ee Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 30 May 2024 15:27:31 +0400 Subject: [PATCH 64/92] Limit testing notebooks --- .ci/validate_notebooks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.ci/validate_notebooks.py b/.ci/validate_notebooks.py index 332ded92991..1974ebefa40 100644 --- a/.ci/validate_notebooks.py +++ b/.ci/validate_notebooks.py @@ -122,6 +122,16 @@ def prepare_test_plan(test_list: Optional[List[str]], ignore_list: List[str], nb "Testing notebooks should be provided to '--test_list' argument as a txt file or should be empty to test all notebooks.\n" f"Received test list: {test_list}" ) + # TODO Remove after testing + notebooks_to_check = [ + "amused-lightweight-text-to-image.ipynb", + "detectron2-to-openvino.ipynb", + "meter-reader.ipynb", + "openvino-tokenizers.ipynb", + "s3d-mil-nce-text-to-video-retrieval.ipynb", + "table-question-answering.ipynb", + ] + testing_notebooks = list(filter(lambda tn: any(n in str(tn) for n in notebooks_to_check), testing_notebooks)) testing_notebooks = sorted(list(set(testing_notebooks))) print(f"Testing notebooks: {testing_notebooks}") From 8aa183de034e195f6b32a94a63473f646b01d2b8 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 30 May 2024 15:30:11 +0400 Subject: [PATCH 65/92] Remove check git step --- .github/workflows/build_treon_reusable.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index e3028eb2066..48e2a9789f2 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -98,13 +98,6 @@ jobs: ./install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y fi - # TODO Remove - - name: Check Git - shell: bash - run: | - git --version - which git - - name: Install GPU Drivers if: ${{ inputs.container }} shell: bash From a7c463103b857f0d52190fdae8352028921ca82e Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 30 May 2024 15:32:11 +0400 Subject: [PATCH 66/92] Add explicit ov installation --- .github/workflows/build_treon_reusable.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 48e2a9789f2..c9600b779a7 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -234,6 +234,7 @@ jobs: # TODO Remove after testing - name: Print devices run: | + python -m pip install openvino python -c 'import openvino as ov;print(ov.Core().available_devices)' # Patch long running cells to run faster From fbc7c213b5c68882626d9232e97b3392b595119e Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 30 May 2024 19:19:13 +0400 Subject: [PATCH 67/92] Skip print devices step --- .github/workflows/build_treon_reusable.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index c9600b779a7..377bed21854 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -129,7 +129,7 @@ jobs: # Cache specific files to reduce downloads or prevent network issues - name: Cache Files id: cachefiles - uses: actions/cache@v3 + uses: actions/cache@v3 # TODO Consider updating cache action to v4 with: path: | # NOTE: when modifying cache paths, update FILES_CACHE_KEY in .env @@ -232,10 +232,10 @@ jobs: python check_install.py # TODO Remove after testing - - name: Print devices - run: | - python -m pip install openvino - python -c 'import openvino as ov;print(ov.Core().available_devices)' + # - name: Print devices + # run: | + # python -m pip install openvino + # python -c 'import openvino as ov;print(ov.Core().available_devices)' # Patch long running cells to run faster - name: Patch notebooks From 20455667e921f28bf9f4f1790fb9fd6a2aff1262 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 30 May 2024 20:12:46 +0400 Subject: [PATCH 68/92] Switch to ov 24.2 dev for testing --- .../amused-lightweight-text-to-image.ipynb | 3 ++- .../detectron2-to-openvino/detectron2-to-openvino.ipynb | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/notebooks/amused-lightweight-text-to-image/amused-lightweight-text-to-image.ipynb b/notebooks/amused-lightweight-text-to-image/amused-lightweight-text-to-image.ipynb index 73d1f778bc9..23e12e8e0a9 100644 --- a/notebooks/amused-lightweight-text-to-image/amused-lightweight-text-to-image.ipynb +++ b/notebooks/amused-lightweight-text-to-image/amused-lightweight-text-to-image.ipynb @@ -66,7 +66,8 @@ }, "outputs": [], "source": [ - "%pip install -q transformers \"diffusers>=0.25.0\" \"openvino>=2023.2.0\" \"accelerate>=0.20.3\" \"gradio>=4.19\" \"torch>=2.1\" \"pillow\" \"torchmetrics\" \"torch-fidelity\" --extra-index-url https://download.pytorch.org/whl/cpu\n", + "%pip install -q transformers \"diffusers>=0.25.0\" \"accelerate>=0.20.3\" \"gradio>=4.19\" \"torch>=2.1\" \"pillow\" \"torchmetrics\" \"torch-fidelity\" --extra-index-url https://download.pytorch.org/whl/cpu\n", + "%pip install -q \"openvino~=2024.2.0.0.dev\" --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release\n", "%pip install -q \"nncf>=2.9.0\" datasets" ] }, diff --git a/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb b/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb index 5bc0f5c87fa..381ba23e259 100644 --- a/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb +++ b/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb @@ -11,7 +11,8 @@ "In this tutorial we consider how to convert and run Detectron2 models using OpenVINO™. We will use `Faster R-CNN FPN x1` model and `Mask R-CNN FPN x3` pretrained on [COCO](https://cocodataset.org/#home) dataset as examples for object detection and instance segmentation respectively.\n", "\n", "\n", - "#### Table of contents:\n\n", + "#### Table of contents:\n", + "\n", "- [Prerequisites](#Prerequisites)\n", " - [Define helpers for PyTorch model initialization and conversion](#Define-helpers-for-PyTorch-model-initialization-and-conversion)\n", " - [Prepare input data](#Prepare-input-data)\n", @@ -46,7 +47,7 @@ "source": [ "%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu torch torchvision\n", "%pip install -q \"git+https://github.com/facebookresearch/detectron2.git\" --extra-index-url https://download.pytorch.org/whl/cpu\n", - "%pip install -q \"openvino>=2023.1.0\"" + "%pip install -q \"openvino~=2024.2.0.0.dev\" --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release" ] }, { @@ -619,4 +620,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} From e3a59010981993384908440f9c8fabaf81910139 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 30 May 2024 22:48:38 +0400 Subject: [PATCH 69/92] Revert "Switch to ov 24.2 dev for testing" This reverts commit 20455667e921f28bf9f4f1790fb9fd6a2aff1262. --- .../amused-lightweight-text-to-image.ipynb | 3 +-- .../detectron2-to-openvino/detectron2-to-openvino.ipynb | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/notebooks/amused-lightweight-text-to-image/amused-lightweight-text-to-image.ipynb b/notebooks/amused-lightweight-text-to-image/amused-lightweight-text-to-image.ipynb index 23e12e8e0a9..73d1f778bc9 100644 --- a/notebooks/amused-lightweight-text-to-image/amused-lightweight-text-to-image.ipynb +++ b/notebooks/amused-lightweight-text-to-image/amused-lightweight-text-to-image.ipynb @@ -66,8 +66,7 @@ }, "outputs": [], "source": [ - "%pip install -q transformers \"diffusers>=0.25.0\" \"accelerate>=0.20.3\" \"gradio>=4.19\" \"torch>=2.1\" \"pillow\" \"torchmetrics\" \"torch-fidelity\" --extra-index-url https://download.pytorch.org/whl/cpu\n", - "%pip install -q \"openvino~=2024.2.0.0.dev\" --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release\n", + "%pip install -q transformers \"diffusers>=0.25.0\" \"openvino>=2023.2.0\" \"accelerate>=0.20.3\" \"gradio>=4.19\" \"torch>=2.1\" \"pillow\" \"torchmetrics\" \"torch-fidelity\" --extra-index-url https://download.pytorch.org/whl/cpu\n", "%pip install -q \"nncf>=2.9.0\" datasets" ] }, diff --git a/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb b/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb index 381ba23e259..5bc0f5c87fa 100644 --- a/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb +++ b/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb @@ -11,8 +11,7 @@ "In this tutorial we consider how to convert and run Detectron2 models using OpenVINO™. We will use `Faster R-CNN FPN x1` model and `Mask R-CNN FPN x3` pretrained on [COCO](https://cocodataset.org/#home) dataset as examples for object detection and instance segmentation respectively.\n", "\n", "\n", - "#### Table of contents:\n", - "\n", + "#### Table of contents:\n\n", "- [Prerequisites](#Prerequisites)\n", " - [Define helpers for PyTorch model initialization and conversion](#Define-helpers-for-PyTorch-model-initialization-and-conversion)\n", " - [Prepare input data](#Prepare-input-data)\n", @@ -47,7 +46,7 @@ "source": [ "%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu torch torchvision\n", "%pip install -q \"git+https://github.com/facebookresearch/detectron2.git\" --extra-index-url https://download.pytorch.org/whl/cpu\n", - "%pip install -q \"openvino~=2024.2.0.0.dev\" --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release" + "%pip install -q \"openvino>=2023.1.0\"" ] }, { @@ -620,4 +619,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} +} \ No newline at end of file From f2d2f1e0abb132799bb5d2e178d808e10fec610f Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 30 May 2024 22:59:20 +0400 Subject: [PATCH 70/92] Add debug install detectron --- .github/workflows/build_treon_reusable.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 377bed21854..200e07eb0e0 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -232,6 +232,13 @@ jobs: python check_install.py # TODO Remove after testing + - name: Debug install detectron + shell: bash + run: | + pip install -q --extra-index-url https://download.pytorch.org/whl/cpu torch torchvision + pip install -q "git+https://github.com/facebookresearch/detectron2.git" --extra-index-url https://download.pytorch.org/whl/cpu + pip install -q "openvino>=2023.1.0" + # TODO Remove after testing # - name: Print devices # run: | # python -m pip install openvino From 966e9ae9cfbead4cb700803f4fac4cceb5d60906 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Thu, 30 May 2024 23:28:01 +0400 Subject: [PATCH 71/92] Add printing torch version --- .github/workflows/build_treon_reusable.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 200e07eb0e0..39c4e6c7d5d 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -235,8 +235,10 @@ jobs: - name: Debug install detectron shell: bash run: | - pip install -q --extra-index-url https://download.pytorch.org/whl/cpu torch torchvision - pip install -q "git+https://github.com/facebookresearch/detectron2.git" --extra-index-url https://download.pytorch.org/whl/cpu + pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v + pip freeze | grep torch + pip install "git+https://github.com/facebookresearch/detectron2.git" -v + pip freeze | grep detectron2 pip install -q "openvino>=2023.1.0" # TODO Remove after testing # - name: Print devices From d97ec1b9880be0bc841ba95dea27b96736e951b4 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 14:25:52 +0400 Subject: [PATCH 72/92] Try using torch v2.2 for detectron --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 39c4e6c7d5d..eefe16cfe8d 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -235,7 +235,7 @@ jobs: - name: Debug install detectron shell: bash run: | - pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v + pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cpu -v pip freeze | grep torch pip install "git+https://github.com/facebookresearch/detectron2.git" -v pip freeze | grep detectron2 From 8870974f64d87965a47e7be2e857040dfbe621ad Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 15:04:57 +0400 Subject: [PATCH 73/92] Revert "Try using torch v2.2 for detectron" This reverts commit d97ec1b9880be0bc841ba95dea27b96736e951b4. --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index eefe16cfe8d..39c4e6c7d5d 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -235,7 +235,7 @@ jobs: - name: Debug install detectron shell: bash run: | - pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cpu -v + pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v pip freeze | grep torch pip install "git+https://github.com/facebookresearch/detectron2.git" -v pip freeze | grep detectron2 From 34cc1257ae4585c45cb84f411be8f3e863283d58 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 15:27:11 +0400 Subject: [PATCH 74/92] Limit job matrix for testing --- .github/workflows/treon.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/treon.yml b/.github/workflows/treon.yml index 966760ae9f5..4f28ca84be6 100644 --- a/.github/workflows/treon.yml +++ b/.github/workflows/treon.yml @@ -27,14 +27,19 @@ jobs: strategy: fail-fast: false matrix: - runs_on: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] - python: ['3.8', '3.9', '3.10'] + # TODO Remove after testing + # runs_on: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] + # python: ['3.8', '3.9', '3.10'] + runs_on: [ubuntu-20.04] + python: ['3.8'] uses: ./.github/workflows/build_treon_reusable.yml with: runs_on: ${{ matrix.runs_on }} python: ${{ matrix.python }} build_treon_gpu: + # TODO Remove after testing + if: false strategy: fail-fast: false matrix: From 4795e2b97e9d02a0fdd3aad71d870307338eb289 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 15:27:19 +0400 Subject: [PATCH 75/92] Skip pip cache step --- .github/workflows/build_treon_reusable.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 39c4e6c7d5d..e4885c422ed 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -118,13 +118,13 @@ jobs: env: AGENT_TOOLSDIRECTORY: ${{ inputs.container && '/opt/hostedtoolcache' || '' }} - - name: Cache OpenVINO Pip Packages - id: cachepip - uses: actions/cache@v3 - with: - path: | - pipcache - key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} + # - name: Cache Pip Packages + # id: cachepip + # uses: actions/cache@v3 + # with: + # path: | + # pipcache + # key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} # Cache specific files to reduce downloads or prevent network issues - name: Cache Files From 9eb54db34ba5bd8a07a5426583e71d6bd5dc5e92 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 15:37:46 +0400 Subject: [PATCH 76/92] Add torch python import for debugging --- .github/workflows/build_treon_reusable.yml | 26 +++++++++------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index e4885c422ed..5298bdd55cf 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -118,6 +118,17 @@ jobs: env: AGENT_TOOLSDIRECTORY: ${{ inputs.container && '/opt/hostedtoolcache' || '' }} + # TODO Remove after testing + - name: Debug install detectron + shell: bash + run: | + pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v + pip freeze | grep torch + python -c 'import torch' + pip install "git+https://github.com/facebookresearch/detectron2.git" -v + pip freeze | grep detectron2 + pip install -q "openvino>=2023.1.0" + # - name: Cache Pip Packages # id: cachepip # uses: actions/cache@v3 @@ -231,21 +242,6 @@ jobs: run: | python check_install.py - # TODO Remove after testing - - name: Debug install detectron - shell: bash - run: | - pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v - pip freeze | grep torch - pip install "git+https://github.com/facebookresearch/detectron2.git" -v - pip freeze | grep detectron2 - pip install -q "openvino>=2023.1.0" - # TODO Remove after testing - # - name: Print devices - # run: | - # python -m pip install openvino - # python -c 'import openvino as ov;print(ov.Core().available_devices)' - # Patch long running cells to run faster - name: Patch notebooks run: | From 152f681b1ef254f6d1b9856feed7b03378fbe14b Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 15:44:55 +0400 Subject: [PATCH 77/92] Add no build isolation flag --- .github/workflows/build_treon_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 5298bdd55cf..9d479c357ad 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -125,7 +125,7 @@ jobs: pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v pip freeze | grep torch python -c 'import torch' - pip install "git+https://github.com/facebookresearch/detectron2.git" -v + pip install "git+https://github.com/facebookresearch/detectron2.git" -v --no-build-isolation pip freeze | grep detectron2 pip install -q "openvino>=2023.1.0" From bdc5cc0f7ae22bf10283bf595ae543083a86f5b1 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 15:53:02 +0400 Subject: [PATCH 78/92] Add ninja installation --- .github/workflows/build_treon_reusable.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 9d479c357ad..9476935ba15 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -122,6 +122,7 @@ jobs: - name: Debug install detectron shell: bash run: | + pip install ninja pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v pip freeze | grep torch python -c 'import torch' From 16c13d6fd08e28970b75c528498c7a2bd6a2f1ca Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 15:55:18 +0400 Subject: [PATCH 79/92] Skip AGENT_TOOLSDIRECTORY --- .github/workflows/build_treon_reusable.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 9476935ba15..39f79383a41 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -115,8 +115,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: '${{ inputs.python }}' - env: - AGENT_TOOLSDIRECTORY: ${{ inputs.container && '/opt/hostedtoolcache' || '' }} + # env: + # AGENT_TOOLSDIRECTORY: ${{ inputs.container && '/opt/hostedtoolcache' || '' }} # TODO Remove after testing - name: Debug install detectron @@ -126,7 +126,7 @@ jobs: pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v pip freeze | grep torch python -c 'import torch' - pip install "git+https://github.com/facebookresearch/detectron2.git" -v --no-build-isolation + pip install "git+https://github.com/facebookresearch/detectron2.git" -v pip freeze | grep detectron2 pip install -q "openvino>=2023.1.0" From 69177df6b0bf6e71497b0d9fbae9256ebf6d2d59 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 16:14:50 +0400 Subject: [PATCH 80/92] Remove index url --- .github/workflows/build_treon_reusable.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 39f79383a41..255aeb31e3f 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -115,15 +115,16 @@ jobs: uses: actions/setup-python@v5 with: python-version: '${{ inputs.python }}' - # env: - # AGENT_TOOLSDIRECTORY: ${{ inputs.container && '/opt/hostedtoolcache' || '' }} + env: + AGENT_TOOLSDIRECTORY: ${{ inputs.container && '/opt/hostedtoolcache' || '' }} # TODO Remove after testing - name: Debug install detectron shell: bash run: | + pip uninstall -y detectron2 pip install ninja - pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v + pip install torch torchvision -v pip freeze | grep torch python -c 'import torch' pip install "git+https://github.com/facebookresearch/detectron2.git" -v From 5b8f7ac6b1aae1b75f17b0d442ef3cc624687ad9 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 16:58:53 +0400 Subject: [PATCH 81/92] Add wheel installation for detectron --- .github/workflows/build_treon_reusable.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 255aeb31e3f..6cb28b197b4 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -122,14 +122,13 @@ jobs: - name: Debug install detectron shell: bash run: | - pip uninstall -y detectron2 - pip install ninja - pip install torch torchvision -v + pip install wheel + pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v pip freeze | grep torch python -c 'import torch' pip install "git+https://github.com/facebookresearch/detectron2.git" -v pip freeze | grep detectron2 - pip install -q "openvino>=2023.1.0" + # pip install -q "openvino>=2023.1.0" # - name: Cache Pip Packages # id: cachepip From effde5aa61df8d1ed80015bdecad1cf192848c23 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 17:30:28 +0400 Subject: [PATCH 82/92] Remove debug step --- .github/workflows/build_treon_reusable.yml | 26 ++++++---------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 6cb28b197b4..997280bd7b7 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -118,25 +118,13 @@ jobs: env: AGENT_TOOLSDIRECTORY: ${{ inputs.container && '/opt/hostedtoolcache' || '' }} - # TODO Remove after testing - - name: Debug install detectron - shell: bash - run: | - pip install wheel - pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu -v - pip freeze | grep torch - python -c 'import torch' - pip install "git+https://github.com/facebookresearch/detectron2.git" -v - pip freeze | grep detectron2 - # pip install -q "openvino>=2023.1.0" - - # - name: Cache Pip Packages - # id: cachepip - # uses: actions/cache@v3 - # with: - # path: | - # pipcache - # key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} + - name: Cache Pip Packages + id: cachepip + uses: actions/cache@v3 + with: + path: | + pipcache + key: ${{ env.PIP_CACHE_KEY }}-${{ env.OS_NAME }}-${{ inputs.python }} # Cache specific files to reduce downloads or prevent network issues - name: Cache Files From e1d3d7f056bd28e6acca394d1e2f2bb37c67a9a6 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 17:31:23 +0400 Subject: [PATCH 83/92] Add wheel dependency to detectron notebook --- .../detectron2-to-openvino/detectron2-to-openvino.ipynb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb b/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb index 5bc0f5c87fa..0663d113372 100644 --- a/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb +++ b/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb @@ -11,7 +11,8 @@ "In this tutorial we consider how to convert and run Detectron2 models using OpenVINO™. We will use `Faster R-CNN FPN x1` model and `Mask R-CNN FPN x3` pretrained on [COCO](https://cocodataset.org/#home) dataset as examples for object detection and instance segmentation respectively.\n", "\n", "\n", - "#### Table of contents:\n\n", + "#### Table of contents:\n", + "\n", "- [Prerequisites](#Prerequisites)\n", " - [Define helpers for PyTorch model initialization and conversion](#Define-helpers-for-PyTorch-model-initialization-and-conversion)\n", " - [Prepare input data](#Prepare-input-data)\n", @@ -44,6 +45,7 @@ "metadata": {}, "outputs": [], "source": [ + "%pip install -q wheel\n", "%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu torch torchvision\n", "%pip install -q \"git+https://github.com/facebookresearch/detectron2.git\" --extra-index-url https://download.pytorch.org/whl/cpu\n", "%pip install -q \"openvino>=2023.1.0\"" @@ -619,4 +621,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} From 654eb321e367996e2cc7ff1ca170d6ef0d91c36f Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 17:52:30 +0400 Subject: [PATCH 84/92] Add opencv dependency to detectron notebook --- notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb b/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb index 0663d113372..2eab370a681 100644 --- a/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb +++ b/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb @@ -45,8 +45,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install -q wheel\n", - "%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu torch torchvision\n", + "%pip install -q \"torch\" \"torchvision\" \"opencv-python\" \"wheel\" --extra-index-url https://download.pytorch.org/whl/cpu \n", "%pip install -q \"git+https://github.com/facebookresearch/detectron2.git\" --extra-index-url https://download.pytorch.org/whl/cpu\n", "%pip install -q \"openvino>=2023.1.0\"" ] From 6e1e2dea974a5b7c816df539f067abda1d8e6248 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 17:53:14 +0400 Subject: [PATCH 85/92] Limit testing notebooks to detectron only --- .ci/validate_notebooks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.ci/validate_notebooks.py b/.ci/validate_notebooks.py index 1974ebefa40..55672e8e210 100644 --- a/.ci/validate_notebooks.py +++ b/.ci/validate_notebooks.py @@ -124,12 +124,12 @@ def prepare_test_plan(test_list: Optional[List[str]], ignore_list: List[str], nb ) # TODO Remove after testing notebooks_to_check = [ - "amused-lightweight-text-to-image.ipynb", + # "amused-lightweight-text-to-image.ipynb", "detectron2-to-openvino.ipynb", - "meter-reader.ipynb", - "openvino-tokenizers.ipynb", - "s3d-mil-nce-text-to-video-retrieval.ipynb", - "table-question-answering.ipynb", + # "meter-reader.ipynb", + # "openvino-tokenizers.ipynb", + # "s3d-mil-nce-text-to-video-retrieval.ipynb", + # "table-question-answering.ipynb", ] testing_notebooks = list(filter(lambda tn: any(n in str(tn) for n in notebooks_to_check), testing_notebooks)) testing_notebooks = sorted(list(set(testing_notebooks))) From 6ac750495e6185999ded61fee788e0c1fe8a9784 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 18:15:53 +0400 Subject: [PATCH 86/92] Limit testing notebooks to 6 items --- .ci/validate_notebooks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.ci/validate_notebooks.py b/.ci/validate_notebooks.py index 55672e8e210..1974ebefa40 100644 --- a/.ci/validate_notebooks.py +++ b/.ci/validate_notebooks.py @@ -124,12 +124,12 @@ def prepare_test_plan(test_list: Optional[List[str]], ignore_list: List[str], nb ) # TODO Remove after testing notebooks_to_check = [ - # "amused-lightweight-text-to-image.ipynb", + "amused-lightweight-text-to-image.ipynb", "detectron2-to-openvino.ipynb", - # "meter-reader.ipynb", - # "openvino-tokenizers.ipynb", - # "s3d-mil-nce-text-to-video-retrieval.ipynb", - # "table-question-answering.ipynb", + "meter-reader.ipynb", + "openvino-tokenizers.ipynb", + "s3d-mil-nce-text-to-video-retrieval.ipynb", + "table-question-answering.ipynb", ] testing_notebooks = list(filter(lambda tn: any(n in str(tn) for n in notebooks_to_check), testing_notebooks)) testing_notebooks = sorted(list(set(testing_notebooks))) From dd10d8327e6c698755141e9633d4dc2aa57caf72 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Fri, 31 May 2024 18:16:49 +0400 Subject: [PATCH 87/92] Unskip treon gpu job --- .github/workflows/treon.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/treon.yml b/.github/workflows/treon.yml index 4f28ca84be6..966760ae9f5 100644 --- a/.github/workflows/treon.yml +++ b/.github/workflows/treon.yml @@ -27,19 +27,14 @@ jobs: strategy: fail-fast: false matrix: - # TODO Remove after testing - # runs_on: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] - # python: ['3.8', '3.9', '3.10'] - runs_on: [ubuntu-20.04] - python: ['3.8'] + runs_on: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] + python: ['3.8', '3.9', '3.10'] uses: ./.github/workflows/build_treon_reusable.yml with: runs_on: ${{ matrix.runs_on }} python: ${{ matrix.python }} build_treon_gpu: - # TODO Remove after testing - if: false strategy: fail-fast: false matrix: From a5d5634a14dfbae6fb425a16ec9cb4a49a714f36 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 3 Jun 2024 18:50:57 +0400 Subject: [PATCH 88/92] Remove testing notebooks limitation --- .ci/validate_notebooks.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.ci/validate_notebooks.py b/.ci/validate_notebooks.py index 1974ebefa40..332ded92991 100644 --- a/.ci/validate_notebooks.py +++ b/.ci/validate_notebooks.py @@ -122,16 +122,6 @@ def prepare_test_plan(test_list: Optional[List[str]], ignore_list: List[str], nb "Testing notebooks should be provided to '--test_list' argument as a txt file or should be empty to test all notebooks.\n" f"Received test list: {test_list}" ) - # TODO Remove after testing - notebooks_to_check = [ - "amused-lightweight-text-to-image.ipynb", - "detectron2-to-openvino.ipynb", - "meter-reader.ipynb", - "openvino-tokenizers.ipynb", - "s3d-mil-nce-text-to-video-retrieval.ipynb", - "table-question-answering.ipynb", - ] - testing_notebooks = list(filter(lambda tn: any(n in str(tn) for n in notebooks_to_check), testing_notebooks)) testing_notebooks = sorted(list(set(testing_notebooks))) print(f"Testing notebooks: {testing_notebooks}") From dc04ec8fd8a12f3d7cb92e47a9680259825c06eb Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 3 Jun 2024 18:51:48 +0400 Subject: [PATCH 89/92] Remove test prefix for status file --- .ci/aggregate_notebooks_reports.py | 3 +-- selector/src/shared/constants.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.ci/aggregate_notebooks_reports.py b/.ci/aggregate_notebooks_reports.py index 7d55ebb690a..434d530e3ad 100644 --- a/.ci/aggregate_notebooks_reports.py +++ b/.ci/aggregate_notebooks_reports.py @@ -59,8 +59,7 @@ def main(): if name not in NOTEBOOKS_STATUS_MAP: NOTEBOOKS_STATUS_MAP[name] = get_default_status_dict(name) NOTEBOOKS_STATUS_MAP[name]["status"][os][device][python] = status - # TODO Remove test prefix aftertesting - write_json_file(Path(REPORTS_DIR) / "test-notebooks-status-map.json", NOTEBOOKS_STATUS_MAP) + write_json_file(Path(REPORTS_DIR) / "notebooks-status-map.json", NOTEBOOKS_STATUS_MAP) if __name__ == "__main__": diff --git a/selector/src/shared/constants.js b/selector/src/shared/constants.js index e2ba928a7ff..1b137960d6c 100644 --- a/selector/src/shared/constants.js +++ b/selector/src/shared/constants.js @@ -1,4 +1,4 @@ // @ts-check export const NOTEBOOKS_METADATA_FILE_NAME = 'notebooks-metadata-map.json'; -export const NOTEBOOKS_STATUS_FILE_NAME = 'test-notebooks-status-map.json'; // TODO Remove 'test-' prefix after testing +export const NOTEBOOKS_STATUS_FILE_NAME = 'notebooks-status-map.json'; From 0c9fafafd8a7af4f0ac45a6bdc4c1d0d5f2478a0 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 3 Jun 2024 18:52:50 +0400 Subject: [PATCH 90/92] Unskip disabled workflows --- .github/workflows/gh_pages_deploy.yml | 9 ++++----- .github/workflows/treon.yml | 13 +++---------- .github/workflows/treon_precommit.yml | 2 -- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/gh_pages_deploy.yml b/.github/workflows/gh_pages_deploy.yml index 4c1a10629d0..c476de7bed6 100644 --- a/.github/workflows/gh_pages_deploy.yml +++ b/.github/workflows/gh_pages_deploy.yml @@ -5,11 +5,10 @@ on: branches: - 'main' - 'latest' - # TODO Remove after testing - # workflow_run: - # workflows: [treon_nightly] - # types: - # - completed + workflow_run: + workflows: [treon_nightly] + types: + - completed workflow_dispatch: concurrency: diff --git a/.github/workflows/treon.yml b/.github/workflows/treon.yml index 966760ae9f5..8a8555f9b80 100644 --- a/.github/workflows/treon.yml +++ b/.github/workflows/treon.yml @@ -1,5 +1,4 @@ -# TODO Remove after testing -name: treon_nightly_test +name: treon_nightly on: workflow_dispatch: @@ -12,11 +11,6 @@ on: - '.github/workflows/.env' schedule: - cron: '30 8 * * *' - # TODO Remove after testing - pull_request: - branches: - - 'main' - - 'latest' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} @@ -70,7 +64,6 @@ jobs: - name: Upload aggregated report uses: actions/upload-artifact@v4 with: - # TODO Remove after testing - name: test-notebooks-status-map.json - path: test_reports/test-notebooks-status-map.json + name: notebooks-status-map.json + path: test_reports/notebooks-status-map.json if-no-files-found: error diff --git a/.github/workflows/treon_precommit.yml b/.github/workflows/treon_precommit.yml index 3c822dfb5b8..e3b84dd4fd6 100644 --- a/.github/workflows/treon_precommit.yml +++ b/.github/workflows/treon_precommit.yml @@ -31,8 +31,6 @@ concurrency: jobs: build_treon: - # TODO Remove after testing - if: false strategy: fail-fast: true matrix: From af433d8d9e38f456af582e6ba6000958fa7827cd Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 3 Jun 2024 18:59:04 +0400 Subject: [PATCH 91/92] Fix black --- notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb b/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb index 2eab370a681..091cbf67f0e 100644 --- a/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb +++ b/notebooks/detectron2-to-openvino/detectron2-to-openvino.ipynb @@ -45,7 +45,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install -q \"torch\" \"torchvision\" \"opencv-python\" \"wheel\" --extra-index-url https://download.pytorch.org/whl/cpu \n", + "%pip install -q \"torch\" \"torchvision\" \"opencv-python\" \"wheel\" --extra-index-url https://download.pytorch.org/whl/cpu\n", "%pip install -q \"git+https://github.com/facebookresearch/detectron2.git\" --extra-index-url https://download.pytorch.org/whl/cpu\n", "%pip install -q \"openvino>=2023.1.0\"" ] From 27f7dacbf1687f6197492e6f8ec821173c1b656a Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 3 Jun 2024 19:15:30 +0400 Subject: [PATCH 92/92] Fix steps order --- .github/workflows/build_treon_reusable.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_treon_reusable.yml b/.github/workflows/build_treon_reusable.yml index 997280bd7b7..a4ea08cfc27 100644 --- a/.github/workflows/build_treon_reusable.yml +++ b/.github/workflows/build_treon_reusable.yml @@ -41,6 +41,12 @@ jobs: core.exportVariable('TEST_REPORT_DIR', testReportDir); core.exportVariable('GIT_CLONE_PROTECTION_ACTIVE', 'false'); + #### Installation/preparation #### + # + # These steps are also copied to convert_notebooks.yml + - name: Checkout repository + uses: actions/checkout@v4 + - name: Get changed files if: ${{ inputs.test_only_changed }} id: changed-files @@ -62,12 +68,6 @@ jobs: echo $file >> test_notebooks.txt done - #### Installation/preparation #### - # - # These steps are also copied to convert_notebooks.yml - - name: Checkout repository - uses: actions/checkout@v4 - - name: Dotenv Action id: dotenv uses: xom9ikk/dotenv@v2.3.0