Skip to content

Commit

Permalink
Torch>=2.0 Unittest support (#216)
Browse files Browse the repository at this point in the history
* Run torch 2 CI

* Experimenting with extra latest configs

* Update actions version to the latest

* Update actions version to the latest

* Fixing torchvision unresolved version

* bump tensorflow-cpu version

* fix tensoflow dep in CI

* add another config to test matrix

* fix typo

* another swing

* reorganize deps for CI to allow testing of more modern versions

---------

Co-authored-by: bkmartinjr <[email protected]>
  • Loading branch information
ktsitsi and bkmartinjr authored Aug 30, 2024
1 parent 3b42e5b commit 8a1bf8d
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,36 @@ jobs:
matrix:
python-verison: ["3.7"]
ml-deps:
- "torch==1.11.0+cpu torchvision==0.12.0+cpu torchdata==0.3.0 tensorflow-cpu==2.8.1"
- "torch==1.12.1+cpu torchvision==0.13.1+cpu torchdata==0.4.1 tensorflow-cpu==2.9.1"
- "torch==1.13.0+cpu torchvision==0.14.0+cpu torchdata==0.5.0 tensorflow-cpu==2.10.0"
- "torch==1.13.0+cpu torchvision==0.14.0+cpu torchdata==0.5.0 tensorflow-cpu==2.11.0"
- "torch==1.11.0+cpu torchvision==0.12.0+cpu torchdata==0.3.0 tensorflow-cpu==2.8.1 scikit-learn==1.0.2"
- "torch==1.12.1+cpu torchvision==0.13.1+cpu torchdata==0.4.1 tensorflow-cpu==2.9.1 scikit-learn==1.0.2"
- "torch==1.13.0+cpu torchvision==0.14.0+cpu torchdata==0.5.0 tensorflow-cpu==2.10.0 scikit-learn==1.0.2"
- "torch==1.13.0+cpu torchvision==0.14.0+cpu torchdata==0.5.0 tensorflow-cpu==2.11.0 scikit-learn==1.0.2"
- "torch==2.1.0+cpu torchvision==0.16.0+cpu torchdata==0.7.0 tensorflow-cpu==2.11.0 scikit-learn==1.0.2"
include:
- ml-deps: "torch==1.13.0+cpu torchvision==0.14.0+cpu torchdata==0.5.0 tensorflow-cpu==2.12.0"
- ml-deps: "torch==1.13.0+cpu torchvision==0.14.0+cpu torchdata==0.5.0 tensorflow-cpu==2.12.0 scikit-learn==1.0.2"
python-version: "3.9"
- ml-deps: "torch==1.13.0+cpu torchvision==0.14.0+cpu torchdata==0.5.0 tensorflow-cpu==2.13.0"
- ml-deps: "torch==1.13.0+cpu torchvision==0.14.0+cpu torchdata==0.5.0 tensorflow-cpu==2.13.0 scikit-learn==1.0.2"
python-version: "3.9"
- ml-deps: "torch==2.1.0+cpu torchvision==0.16.0+cpu torchdata==0.7.0 tensorflow-cpu==2.13.0 numpy==1.24.3 scikit-learn==1.0.2"
python-version: "3.9"
- ml-deps: "torch==2.3.1+cpu torchvision==0.18.1+cpu torchdata==0.8.0 'tensorflow-cpu<2.16.0' 'numpy<2' 'scikit-learn>=1.0'"
python-version: "3.9"
- ml-deps: "torch torchvision torchdata~=0.8.0 'tensorflow-cpu<2.16.0' 'numpy<2' 'scikit-learn>=1.0'"
python-version: "3.11"

env:
run_coverage: ${{ github.ref == 'refs/heads/master' }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}:ml-deps=[${{ matrix.ml-deps }}]
Expand All @@ -42,7 +49,7 @@ jobs:
run: |
pip install --upgrade pip
pip install -f https://download.pytorch.org/whl/torch_stable.html protobuf==3.* ${{ matrix.ml-deps }}
pip install pytest-mock pytest-cov scikit-learn==1.0.2
pip install pytest-mock pytest-cov
pip install -e .[cloud]
- name: Run pre-commit hooks
Expand Down

0 comments on commit 8a1bf8d

Please sign in to comment.