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 Tensorflow | |
# 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 action 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_unit_tests_tensorflow.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'python/nano/**' | |
- '.github/workflows/nano_unit_tests_tensorflow.yml' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
nano-unit-test-tensorflow: | |
# 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"] | |
tf-version: [ | |
"intel-tensorflow==2.7.0", | |
"intel-tensorflow==2.8.0", | |
"intel-tensorflow==2.9.1", | |
"intel-tensorflow==2.10.0", | |
"tensorflow==2.7.4", | |
"tensorflow==2.8.4", | |
"tensorflow==2.9.3", | |
"tensorflow==2.10.1" | |
] | |
# 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 | |
sudo apt-get update && sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev | |
- name: Run TensorFlow unit tests (train) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n nano-tensorflow -y python==3.8.16 | |
source $CONDA/bin/activate nano-tensorflow | |
$CONDA/bin/conda info | |
pip install ${{matrix.tf-version}} tf2onnx==1.13.0 | |
bash python/nano/dev/build_and_install.sh linux default false basic | |
pip install pytest | |
source bigdl-nano-init | |
bash python/nano/test/run-nano-tf-train-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n nano-tensorflow --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run TensorFlow unit tests (inference) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n nano-tensorflow -y python==3.8.16 | |
source $CONDA/bin/activate nano-tensorflow | |
$CONDA/bin/conda info | |
pip install ${{matrix.tf-version}} tf2onnx==1.13.0 | |
bash python/nano/dev/build_and_install.sh linux default false inference | |
pip install pytest | |
source bigdl-nano-init | |
bash python/nano/test/run-nano-tf-inference-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n nano-tensorflow --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
nano-unit-test-tensorflow-deps: | |
# 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.7"] | |
tf-version: [ | |
"intel-tensorflow==2.7.0", | |
"intel-tensorflow==2.8.0", | |
"intel-tensorflow==2.9.1", | |
"intel-tensorflow==2.10.0", | |
"tensorflow==2.7.4", | |
"tensorflow==2.8.4", | |
"tensorflow==2.9.3", | |
"tensorflow==2.10.1" | |
] | |
# 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@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev | |
- name: Run TensorFlow unit tests (Horovod) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n horovod-tf -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate horovod-tf | |
$CONDA/bin/conda info | |
pip install ${{matrix.tf-version}} tf2onnx==1.13.0 | |
bash python/nano/dev/build_and_install.sh linux default false basic | |
HOROVOD_WITH_MPI=1 HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITHOUT_PYTORCH=1 pip install --no-cache-dir horovod==0.25.0 | |
pip install pytest | |
source bigdl-nano-init | |
bash python/nano/test/run-nano-tf-horovod-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n horovod-tf --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run TensorFlow unit tests (Ray) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n ray-tf -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate ray-tf | |
$CONDA/bin/conda info | |
pip install ${{matrix.tf-version}} tf2onnx==1.13.0 | |
bash python/nano/dev/build_and_install.sh linux default false basic | |
pip install pytest | |
# fix issue, see https://github.com/intel-analytics/BigDL/blob/main/docs/readthedocs/source/doc/Nano/Overview/known_issues.md#ray-issues | |
pip install google-api-core==2.8.2 | |
pip install ray[default]==1.11.0 prometheus_client==0.13.0 | |
source bigdl-nano-init | |
bash python/nano/test/run-nano-tf-ray-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n ray-tf --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run TensorFlow unit tests (Automl) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n nano-automl-tf -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate nano-automl-tf | |
$CONDA/bin/conda info | |
pip install ${{matrix.tf-version}} tf2onnx==1.13.0 | |
bash python/nano/dev/build_and_install.sh linux default false basic | |
pip install pytest | |
pip install ConfigSpace | |
pip install 'optuna<=3.1.1' | |
source bigdl-nano-init | |
bash python/nano/test/run-nano-automl-common-tests.sh | |
bash python/nano/test/run-nano-automl-tf-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n nano-automl-tf --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run TensorFlow unit tests (INC) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n inc-tf -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate inc-tf | |
$CONDA/bin/conda info | |
pip install ${{matrix.tf-version}} tf2onnx==1.13.0 | |
bash python/nano/dev/build_and_install.sh linux default false inference | |
pip install pytest | |
source bigdl-nano-init | |
bash python/nano/test/run-nano-tf-inc-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n inc-tf --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run tensorflow unit tests (OpenVINO) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n openvino-tensorflow -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate openvino-tensorflow | |
$CONDA/bin/conda info | |
pip install ${{matrix.tf-version}} tf2onnx==1.13.0 | |
bash python/nano/dev/build_and_install.sh linux default false inference | |
pip install pytest | |
source bigdl-nano-init | |
bash python/nano/test/run-nano-tf-openvino-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n openvino-tensorflow --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Run tensorflow unit tests (ONNX) | |
shell: bash | |
run: | | |
$CONDA/bin/conda create -n onnx-tensorflow -y python==3.8.16 setuptools=58.0.4 | |
source $CONDA/bin/activate onnx-tensorflow | |
$CONDA/bin/conda info | |
pip install ${{matrix.tf-version}} tf2onnx==1.13.0 | |
bash python/nano/dev/build_and_install.sh linux default false inference | |
pip install pytest | |
source bigdl-nano-init | |
bash python/nano/test/run-nano-tf-onnx-tests.sh | |
source $CONDA/bin/deactivate | |
$CONDA/bin/conda remove -n onnx-tensorflow --all | |
env: | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} |