-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Tony-Y/test-python-versions
Update CI adding Python 3.9, 3.10, 3.11, and 3.12
- Loading branch information
Showing
11 changed files
with
182 additions
and
22 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Download emnist | ||
|
||
on: [push] | ||
|
||
jobs: | ||
download: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 8 | ||
matrix: | ||
torchvision-version: [0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.1, 0.11.2, 0.11.3, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.17.2, 0.18.0] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y libtinfo5 | ||
python -m pip install --upgrade pip | ||
pip install numpy -U | ||
pip install torchvision==${{ matrix.torchvision-version }} -f https://download.pytorch.org/whl/torch_stable.html | ||
pip install setuptools | ||
pip install requests | ||
- name: Install package | ||
run: python -m pip install . | ||
- name: Download EMNIST dataset | ||
run: python examples/emnist/download.py | ||
- name: Extract EMNIST dataset | ||
run: python examples/emnist/main.py --epochs 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Example emnist | ||
|
||
on: [push] | ||
|
||
jobs: | ||
train: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 8 | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9, '3.10', 3.11, 3.12] | ||
os: [macos-13, windows-latest, ubuntu-latest] | ||
include: | ||
- pytorch-version: 1.4.0 | ||
torchvision-version: 0.5.0 | ||
- pytorch-version: 1.8.0 | ||
torchvision-version: 0.9.0 | ||
python-version: 3.9 | ||
- pytorch-version: 1.11.0 | ||
torchvision-version: 0.12.0 | ||
python-version: '3.10' | ||
- pytorch-version: 2.0.0 | ||
torchvision-version: 0.15.1 | ||
python-version: 3.11 | ||
- pytorch-version: 2.2.0 | ||
torchvision-version: 0.17.0 | ||
python-version: 3.12 | ||
- pytorch-option: '+cpu' | ||
- pytorch-option: '' | ||
os: macos-13 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install numpy -U | ||
pip install torch==${{ matrix.pytorch-version }}${{ matrix.pytorch-option }} torchvision==${{ matrix.torchvision-version }}${{ matrix.pytorch-option }} -f https://download.pytorch.org/whl/torch_stable.html | ||
pip install setuptools | ||
pip install requests | ||
- name: Install package | ||
run: python -m pip install . | ||
- name: Download EMNIST dataset | ||
run: python examples/emnist/download.py | ||
- name: Train a model on EMNIST dataset | ||
run: python examples/emnist/main.py --epochs 1 |
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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
from .base import * | ||
from .untuned import * | ||
from .radam import * | ||
from .base import BaseWarmup, LinearWarmup, ExponentialWarmup | ||
from .untuned import UntunedLinearWarmup, UntunedExponentialWarmup | ||
from .radam import RAdamWarmup, rho_fn, rho_inf_fn, get_offset | ||
|
||
__version__ = "0.2.0.dev0" | ||
|
||
__all__ = [ | ||
'BaseWarmup', | ||
'LinearWarmup', | ||
'ExponentialWarmup', | ||
'UntunedLinearWarmup', | ||
'UntunedExponentialWarmup', | ||
'RAdamWarmup', | ||
'rho_fn', | ||
'rho_inf_fn', | ||
'get_offset', | ||
] |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[metadata] | ||
version = attr: pytorch_warmup.__version__ | ||
license_files = LICENSE |
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