Skip to content

Fix dependabot issues (#5179) #2

Fix dependabot issues (#5179)

Fix dependabot issues (#5179) #2

name: Nano Unit Tests for How-To Guides 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_howto_guides_tests.yml'
pull_request:
branches: [ main ]
paths:
- 'python/nano/**'
- '.github/workflows/nano_howto_guides_tests.yml'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
nano-howto-guides-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 unit tests for Inference PyTorch how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-inference-pytorch -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-inference-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 ipykernel==5.5.6
bash python/nano/tutorial/notebook/inference/pytorch/run-nano-howto-guides-inference-pytorch-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-inference-pytorch --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run unit tests for Training PyTorch how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-training-pytorch -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-training-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
bash python/nano/tutorial/notebook/training/pytorch/run-nano-howto-guides-training-pytorch-tests.sh
bash python/nano/tutorial/notebook/preprocessing/pytorch/run-nano-howto-guides-preprocessing-pytorch-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-training-pytorch --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run unit tests for Training PyTorch Lightning how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-training-pytorch-lightning -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-training-pytorch-lightning
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false pytorch
source bigdl-nano-init
pip install pytest nbmake
bash python/nano/tutorial/notebook/training/pytorch-lightning/run-nano-howto-guides-training-pytorch-lightning-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-training-pytorch-lightning --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
nano-howto-guides-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 unit tests for Inference TensorFlow how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-inference-tensorflow -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-inference-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 ipykernel==5.5.6
bash python/nano/tutorial/notebook/inference/tensorflow/run-nano-howto-guides-inference-tensorflow-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-inference-tensorflow --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run unit tests for Training TensorFlow how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-training-tensorflow -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-training-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 basic
source bigdl-nano-init
pip install pytest nbmake
pip install ipykernel==5.5.6
pip install tensorflow-datasets==4.4.0
pip install protobuf==3.19.5
pip install tensorflow-metadata==1.13.0
bash python/nano/tutorial/notebook/training/tensorflow/run-nano-howto-guides-training-tensorflow-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-training-tensorflow --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
nano-howto-guides-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 unit tests for Inference OpenVINO how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-inference-openvino -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-inference-openvino
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false basic
source bigdl-nano-init
pip install pytest nbmake
pip install openvino-dev==2022.3.0
bash python/nano/tutorial/notebook/inference/openvino/run-nano-howto-guides-inference-openvino-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-inference-openvino --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
# TODO: Add test for /notebook/inference/openvino/accelerate_inference_openvino_gpu.ipynb
# when GPU is avaliable for action tests.
# For this notebook, we may need to install with options pytorch,tensorflow,inference