Bump torch from 2.1.0 to 2.2.0 in /models #357
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Lint and Test onnxflow | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MLAGILITY_DEBUG: True | |
MLAGILITY_TRACEBACK: True | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
activate-environment: mla | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
shell: bash -el {0} | |
run: | | |
python -m pip install --upgrade pip | |
conda install pylint | |
if [ -f setup.py ]; then pip install -e .[tensorflow]; fi | |
pip install transformers | |
python -m pip check | |
- name: Lint with PyLint | |
shell: bash -el {0} | |
run: | | |
pylint src/onnxflow --rcfile .pylintrc | |
pylint examples/onnxflow --rcfile .pylintrc | |
- name: Test with unittest | |
shell: bash -el {0} | |
run: | | |
# onnxflow examples | |
rm -rf ~/.cache/onnxflow_test_cache | |
python examples/onnxflow/hello_torch_world.py | |
rm -rf ~/.cache/onnxflow_test_cache | |
python examples/onnxflow/hello_keras_world.py | |
rm -rf ~/.cache/onnxflow_test_cache | |
python examples/onnxflow/hello_onnx_world.py | |
rm -rf ~/.cache/onnxflow_test_cache | |
python examples/onnxflow/randomforest.py | |
rm -rf ~/.cache/onnxflow_test_cache | |
python examples/onnxflow/xgbclassifier.py | |
rm -rf ~/.cache/onnxflow_test_cache | |
python examples/onnxflow/lgbmclassifier.py | |
rm -rf ~/.cache/onnxflow_test_cache | |
python examples/onnxflow/kneighborsclassifier.py | |
# onnxflow tests | |
rm -rf ~/.cache/onnxflow_test_cache | |
python test/build_model.py |