Fix dependabot issues (#5179) #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nano Unit Tests for Notebooks | |
# Cancel previous runs in the PR when you push new commits | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
paths: | |
- 'python/nano/**' | |
- '.github/workflows/nano_notebooks_tests.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'python/nano/**' | |
- '.github/workflows/nano_notebooks_tests.yml' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
nano-notebooks-pytorch-test: | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-20.04"] | |
python-version: ["3.8"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools==58.0.4 | |
python -m pip install --upgrade wheel | |
- name: Run cifar10 notebooks PyTorch unit tests | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n notebooks-trainer-pytorch -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate notebooks-trainer-pytorch | |
$CONDA/bin/conda info | |
bash python/nano/dev/build_and_install.sh linux default false pytorch,inference | |
source bigdl-nano-init | |
pip install pytest nbmake | |
pip install lightning-bolts==0.5.0 | |
bash python/nano/notebooks/pytorch/cifar10/run-nano-notebooks-pytorch-cifar10-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n notebooks-trainer-pytorch --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run tutorial notebooks Pytorch unit tests | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n notebooks-tutorial-pytorch -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate notebooks-tutorial-pytorch | |
$CONDA/bin/conda info | |
bash python/nano/dev/build_and_install.sh linux default false pytorch,inference | |
source bigdl-nano-init | |
pip install pytest nbmake | |
pip install lightning-bolts==0.5.0 | |
bash python/nano/notebooks/pytorch/tutorial/run-nano-notebooks-pytorch-tutorial-tests.sh false | |
bash python/nano/tutorial/inference/pytorch/run_nano_pytorch_inference_tests_onnx.sh | |
bash python/nano/tutorial/training/pytorch-lightning/run_nano_pytorch_lightning_test.sh | |
bash python/nano/tutorial/training/pytorch/run_nano_pytorch_test.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n notebooks-tutorial-pytorch --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run tutorial notebooks Pytorch unit tests(OpenVINO) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n notebooks-tutorial-pytorch -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate notebooks-tutorial-pytorch | |
$CONDA/bin/conda info | |
bash python/nano/dev/build_and_install.sh linux default false pytorch | |
source bigdl-nano-init | |
pip install pytest nbmake | |
pip install ipykernel==5.5.6 | |
pip install openvino-dev==2022.3.0 | |
bash python/nano/notebooks/pytorch/tutorial/run-nano-notebooks-pytorch-tutorial-tests.sh true | |
bash python/nano/tutorial/inference/pytorch/run_nano_pytorch_inference_tests_openvino.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n notebooks-tutorial-pytorch --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run tutorial notebooks Pytorch unit tests(JIT+IPEX) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n notebooks-tutorial-pytorch -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate notebooks-tutorial-pytorch | |
$CONDA/bin/conda info | |
bash python/nano/dev/build_and_install.sh linux default false pytorch | |
source bigdl-nano-init | |
pip install six | |
bash python/nano/tutorial/inference/pytorch/run_nano_pytorch_inference_tests_jit_ipex.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n notebooks-tutorial-pytorch --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run realworld notebooks Pytorch unit tests(OpenVINO) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n notebooks-tutorial-pytorch -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate notebooks-tutorial-pytorch | |
$CONDA/bin/conda info | |
bash python/nano/dev/build_and_install.sh linux default false pytorch | |
source bigdl-nano-init | |
pip install pytest nbmake | |
pip install ipykernel==5.5.6 | |
pip install openvino-dev==2022.3.0 | |
pip install matplotlib | |
bash python/nano/notebooks/pytorch/openvino/run-nano-notebooks-pytorch-openvino-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n notebooks-tutorial-pytorch --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
nano-notebooks-tensorflow-test: | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-20.04"] | |
python-version: ["3.8"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools==58.0.4 | |
python -m pip install --upgrade wheel | |
- name: Run TensorFlow Example | |
run: | | |
$CONDA/bin/conda create -n example-tensorflow -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate example-tensorflow | |
pip install intel-tensorflow==2.9.1 tf2onnx==1.13.0 | |
bash python/nano/dev/build_and_install.sh linux default false inference | |
pip install tensorflow-datasets==4.4.0 | |
pip install protobuf==3.19.5 | |
pip install tensorflow-metadata==1.13.0 | |
source bigdl-nano-init | |
bash python/nano/tutorial/training/tensorflow/run-nano-tensorflow-test.sh | |
bash python/nano/tutorial/inference/tensorflow/run_nano_tf_quantization_inference_tests.sh | |
bash python/nano/tutorial/inference/tensorflow/run_nano_tf_inference_tests_onnx.sh | |
bash python/nano/tutorial/inference/tensorflow/run_nano_tf_inference_tests_openvino.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n example-tensorflow --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run tutorial notebooks TensorFlow unit tests | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n notebooks-tutorial-tensorflow -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate notebooks-tutorial-tensorflow | |
$CONDA/bin/conda info | |
pip install intel-tensorflow==2.9.1 tf2onnx==1.13.0 | |
bash python/nano/dev/build_and_install.sh linux default false inference | |
source bigdl-nano-init | |
pip install pytest nbmake | |
pip install jupyter nbconvert | |
pip install tensorflow-datasets==4.4.0 | |
pip install protobuf==3.19.5 | |
pip install tensorflow-metadata==1.13.0 | |
bash python/nano/notebooks/tensorflow/tutorial/run-nano-notebooks-tensorflow-tutorial-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n notebooks-tutorial-tensorflow --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
nano-notebooks-OpenVINO-test: | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-20.04"] | |
python-version: ["3.8"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools==58.0.4 | |
python -m pip install --upgrade wheel | |
- name: Run tutorial notebooks OpenVINO unit tests | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n notebooks-tutorial-openvino -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate notebooks-tutorial-openvino | |
$CONDA/bin/conda info | |
bash python/nano/dev/build_and_install.sh linux default false basic | |
source bigdl-nano-init | |
pip install openvino-dev==2022.3.0 | |
bash python/nano/tutorial/inference/openvino/run_nano_openvino_inference_tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n notebooks-tutorial-openvino --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} |