test with py 3.13 and pytorch 2.6 #645
This file contains hidden or 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: Unittest | |
on: | |
push: | |
branches-ignore: | |
- "master" | |
pull_request: | |
workflow_call: | |
jobs: | |
tensorneko-util-import-test: | |
name: Import Test / tensorneko-util | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements_util.txt | |
python init.py | |
- name: Try importing package | |
run: | | |
cd src | |
python -c "import tensorneko_util" | |
tensorneko-tool-import-test: | |
name: Import Test / tensorneko-util | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements_tool.txt | |
pip install -r requirements_util.txt | |
python init.py | |
- name: Try importing package | |
run: | | |
cd src | |
python -c "import tensorneko_tool.__main__" | |
tensorneko-import-test: | |
name: Import Test / tensorneko | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: npm install and build | |
working-directory: ./src/tensorneko_util/visualization/watcher/web | |
run: | | |
npm install | |
npm run build | |
env: | |
CI: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install -r requirements_util.txt | |
python init.py | |
- name: Try importing package | |
run: | | |
cd src | |
python -c "import tensorneko" | |
python -c "import tensorneko.neko_model" | |
build-tensorneko-lib: | |
name: Build Tensorneko Lib | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Modify the setup files | |
run: | | |
rm -rf src/tensorneko_util | |
rm -rf src/tensorneko | |
rm setup.py | |
rm setup_util.py | |
mv pyproject_lib.toml pyproject.toml | |
new_version=$(cat version.txt) && sed -i "/^\[package\]$/,/^\[/ s/^version = \".*\"/version = \"$new_version\"/" Cargo.toml | |
- uses: PyO3/maturin-action@v1 | |
with: | |
manylinux: auto | |
command: build | |
rust-toolchain: nightly | |
args: --release | |
unittest: | |
name: Unittest | |
runs-on: ubuntu-24.04 | |
needs: [tensorneko-util-import-test, tensorneko-import-test] | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
torch-version: ["1.11.*", "1.12.*", "1.13.*", "2.0.*", "2.1.*", "2.2.*", "2.3.*", "2.4.*", "2.5.*", "2.6.*"] | |
lightning-version: ["2.0.*", "2.1.*", "2.2.*", "2.3.*", "2.4.*", "2.5.*"] | |
exclude: | |
- python-version: "3.8" | |
lightning-version: "2.4.*" | |
- python-version: "3.8" | |
lightning-version: "2.5.*" | |
- python-version: "3.11" | |
lightning-version: "2.0.*" | |
- python-version: "3.12" | |
lightning-version: "2.0.*" | |
- python-version: "3.12" | |
lightning-version: "2.1.*" | |
- python-version: "3.12" | |
lightning-version: "2.2.*" | |
- python-version: "3.12" | |
lightning-version: "2.3.*" | |
- lightning-version: "2.5.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.5.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.5.*" | |
torch-version: "1.13.*" | |
- lightning-version: "2.5.*" | |
torch-version: "2.0.*" | |
- lightning-version: "2.5.*" | |
torch-version: "2.1.*" | |
- lightning-version: "2.4.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.4.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.4.*" | |
torch-version: "1.13.*" | |
- lightning-version: "2.4.*" | |
torch-version: "2.0.*" | |
- lightning-version: "2.3.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.3.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.3.*" | |
torch-version: "1.13.*" | |
- lightning-version: "2.3.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.3.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.3.*" | |
torch-version: "2.6.*" | |
- lightning-version: "2.2.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.2.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.3.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.6.*" | |
- lightning-version: "2.1.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.2.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.3.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.6.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.1.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.2.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.3.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.6.*" | |
- python-version: "3.10" | |
torch-version: "1.9.*" | |
- python-version: "3.10" | |
torch-version: "1.10.*" | |
- python-version: "3.11" | |
torch-version: "1.9.*" | |
- python-version: "3.11" | |
torch-version: "1.10.*" | |
- python-version: "3.11" | |
torch-version: "1.11.*" | |
- python-version: "3.11" | |
torch-version: "1.12.*" | |
- python-version: "3.12" | |
torch-version: "1.9.*" | |
- python-version: "3.12" | |
torch-version: "1.10.*" | |
- python-version: "3.12" | |
torch-version: "1.11.*" | |
- python-version: "3.12" | |
torch-version: "1.12.*" | |
- python-version: "3.12" | |
torch-version: "1.13.*" | |
- python-version: "3.12" | |
torch-version: "2.0.*" | |
- python-version: "3.12" | |
torch-version: "2.1.*" | |
- python-version: "3.13" | |
torch-version: "1.9.*" | |
- python-version: "3.13" | |
torch-version: "1.10.*" | |
- python-version: "3.13" | |
torch-version: "1.11.*" | |
- python-version: "3.13" | |
torch-version: "1.12.*" | |
- python-version: "3.13" | |
torch-version: "1.13.*" | |
- python-version: "3.13" | |
torch-version: "2.0.*" | |
- python-version: "3.13" | |
torch-version: "2.1.*" | |
- python-version: "3.13" | |
torch-version: "2.2.*" | |
- python-version: "3.13" | |
torch-version: "2.3.*" | |
- python-version: "3.13" | |
torch-version: "2.4.*" | |
- python-version: "3.13" | |
torch-version: "2.5.*" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
pip install torch==${{ matrix.torch-version }} lightning==${{ matrix.lightning-version }} | |
pip install -r requirements_test.txt | |
python init.py | |
- name: Set PYTHONPATH | |
run: echo "PYTHONPATH=$(pwd)/src" >> $GITHUB_ENV | |
- name: Run Test | |
run: python -m unittest discover test | |
coverage: | |
# Run coverage and report to coveralls | |
name: Coverage | |
runs-on: ubuntu-24.04 | |
needs: [unittest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements_test.txt | |
python init.py | |
pip install coverage pytest coveralls | |
- name: Set PYTHONPATH | |
run: echo "PYTHONPATH=$(pwd)/src" >> $GITHUB_ENV | |
- name: Run Coverage | |
run: coverage run --source=tensorneko,tensorneko_util -m pytest | |
- name: Coveralls | |
run: coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: tensorneko | |
COVERALLS_PARALLEL: true | |
coveralls_finish: | |
name: Coveralls Finish | |
needs: [coverage] | |
runs-on: ubuntu-24.04 | |
container: python:3-slim | |
steps: | |
- name: Finished | |
run: | | |
pip3 install --upgrade coveralls | |
coveralls --service=github --finish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-web: | |
name: Build Web | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: npm install and build | |
working-directory: ./src/tensorneko_util/visualization/watcher/web | |
run: | | |
npm install | |
npm run build | |
env: | |
CI: true | |
- name: Print dist path | |
working-directory: ./src/tensorneko_util/visualization/watcher/web | |
run: | | |
echo ----------dist------- | |
ls -l dist | |
echo ----------dist/assets------- | |
ls -l dist/assets | |
simulate-training-classifier: | |
name: Simulate Training / Classifier | |
needs: [unittest, build-web] | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
torch-version: ["1.11.*", "1.12.*", "1.13.*", "2.0.*", "2.1.*", "2.2.*", "2.3.*", "2.4.*", "2.5.*", "2.6.*"] | |
lightning-version: ["2.0.*", "2.1.*", "2.2.*", "2.3.*", "2.4.*", "2.5.*"] | |
exclude: | |
- python-version: "3.8" | |
lightning-version: "2.4.*" | |
- python-version: "3.8" | |
lightning-version: "2.5.*" | |
- python-version: "3.11" | |
lightning-version: "2.0.*" | |
- python-version: "3.12" | |
lightning-version: "2.0.*" | |
- python-version: "3.12" | |
lightning-version: "2.1.*" | |
- python-version: "3.12" | |
lightning-version: "2.2.*" | |
- python-version: "3.12" | |
lightning-version: "2.3.*" | |
- lightning-version: "2.5.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.5.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.5.*" | |
torch-version: "1.13.*" | |
- lightning-version: "2.5.*" | |
torch-version: "2.0.*" | |
- lightning-version: "2.5.*" | |
torch-version: "2.1.*" | |
- lightning-version: "2.4.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.4.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.4.*" | |
torch-version: "1.13.*" | |
- lightning-version: "2.4.*" | |
torch-version: "2.0.*" | |
- lightning-version: "2.3.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.3.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.3.*" | |
torch-version: "1.13.*" | |
- lightning-version: "2.3.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.3.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.3.*" | |
torch-version: "2.6.*" | |
- lightning-version: "2.2.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.2.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.3.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.6.*" | |
- lightning-version: "2.1.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.2.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.3.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.6.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.1.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.2.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.3.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.6.*" | |
- python-version: "3.10" | |
torch-version: "1.9.*" | |
- python-version: "3.10" | |
torch-version: "1.10.*" | |
- python-version: "3.11" | |
torch-version: "1.9.*" | |
- python-version: "3.11" | |
torch-version: "1.10.*" | |
- python-version: "3.11" | |
torch-version: "1.11.*" | |
- python-version: "3.11" | |
torch-version: "1.12.*" | |
- python-version: "3.12" | |
torch-version: "1.9.*" | |
- python-version: "3.12" | |
torch-version: "1.10.*" | |
- python-version: "3.12" | |
torch-version: "1.11.*" | |
- python-version: "3.12" | |
torch-version: "1.12.*" | |
- python-version: "3.12" | |
torch-version: "1.13.*" | |
- python-version: "3.12" | |
torch-version: "2.0.*" | |
- python-version: "3.12" | |
torch-version: "2.1.*" | |
- python-version: "3.13" | |
torch-version: "1.9.*" | |
- python-version: "3.13" | |
torch-version: "1.10.*" | |
- python-version: "3.13" | |
torch-version: "1.11.*" | |
- python-version: "3.13" | |
torch-version: "1.12.*" | |
- python-version: "3.13" | |
torch-version: "1.13.*" | |
- python-version: "3.13" | |
torch-version: "2.0.*" | |
- python-version: "3.13" | |
torch-version: "2.1.*" | |
- python-version: "3.13" | |
torch-version: "2.2.*" | |
- python-version: "3.13" | |
torch-version: "2.3.*" | |
- python-version: "3.13" | |
torch-version: "2.4.*" | |
- python-version: "3.13" | |
torch-version: "2.5.*" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
pip install torch==${{ matrix.torch-version }} | |
pip install lightning==${{ matrix.lightning-version }} | |
pip install -r requirements_test.txt | |
python init.py | |
- name: Set PYTHONPATH | |
run: echo "PYTHONPATH=$(pwd)/src" >> $GITHUB_ENV | |
- name: Run Simulation | |
run: python test/simulate/simulate_train_mnist_cla.py | |
simulate-training-gan: | |
name: Simulate Training / GAN | |
needs: [unittest, build-web] | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
torch-version: ["1.11.*", "1.12.*", "1.13.*", "2.0.*", "2.1.*", "2.2.*", "2.3.*", "2.4.*", "2.5.*", "2.6.*"] | |
lightning-version: ["2.0.*", "2.1.*", "2.2.*", "2.3.*", "2.4.*", "2.5.*"] | |
exclude: | |
- python-version: "3.8" | |
lightning-version: "2.4.*" | |
- python-version: "3.8" | |
lightning-version: "2.5.*" | |
- python-version: "3.11" | |
lightning-version: "2.0.*" | |
- python-version: "3.12" | |
lightning-version: "2.0.*" | |
- python-version: "3.12" | |
lightning-version: "2.1.*" | |
- python-version: "3.12" | |
lightning-version: "2.2.*" | |
- python-version: "3.12" | |
lightning-version: "2.3.*" | |
- lightning-version: "2.5.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.5.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.5.*" | |
torch-version: "1.13.*" | |
- lightning-version: "2.5.*" | |
torch-version: "2.0.*" | |
- lightning-version: "2.5.*" | |
torch-version: "2.1.*" | |
- lightning-version: "2.4.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.4.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.4.*" | |
torch-version: "1.13.*" | |
- lightning-version: "2.4.*" | |
torch-version: "2.0.*" | |
- lightning-version: "2.3.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.3.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.3.*" | |
torch-version: "1.13.*" | |
- lightning-version: "2.3.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.3.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.3.*" | |
torch-version: "2.6.*" | |
- lightning-version: "2.2.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.2.*" | |
torch-version: "1.12.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.3.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.2.*" | |
torch-version: "2.6.*" | |
- lightning-version: "2.1.*" | |
torch-version: "1.11.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.2.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.3.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.1.*" | |
torch-version: "2.6.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.1.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.2.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.3.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.4.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.5.*" | |
- lightning-version: "2.0.*" | |
torch-version: "2.6.*" | |
- python-version: "3.10" | |
torch-version: "1.9.*" | |
- python-version: "3.10" | |
torch-version: "1.10.*" | |
- python-version: "3.11" | |
torch-version: "1.9.*" | |
- python-version: "3.11" | |
torch-version: "1.10.*" | |
- python-version: "3.11" | |
torch-version: "1.11.*" | |
- python-version: "3.11" | |
torch-version: "1.12.*" | |
- python-version: "3.12" | |
torch-version: "1.9.*" | |
- python-version: "3.12" | |
torch-version: "1.10.*" | |
- python-version: "3.12" | |
torch-version: "1.11.*" | |
- python-version: "3.12" | |
torch-version: "1.12.*" | |
- python-version: "3.12" | |
torch-version: "1.13.*" | |
- python-version: "3.12" | |
torch-version: "2.0.*" | |
- python-version: "3.12" | |
torch-version: "2.1.*" | |
- python-version: "3.13" | |
torch-version: "1.9.*" | |
- python-version: "3.13" | |
torch-version: "1.10.*" | |
- python-version: "3.13" | |
torch-version: "1.11.*" | |
- python-version: "3.13" | |
torch-version: "1.12.*" | |
- python-version: "3.13" | |
torch-version: "1.13.*" | |
- python-version: "3.13" | |
torch-version: "2.0.*" | |
- python-version: "3.13" | |
torch-version: "2.1.*" | |
- python-version: "3.13" | |
torch-version: "2.2.*" | |
- python-version: "3.13" | |
torch-version: "2.3.*" | |
- python-version: "3.13" | |
torch-version: "2.4.*" | |
- python-version: "3.13" | |
torch-version: "2.5.*" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
pip install torch==${{ matrix.torch-version }} | |
pip install lightning==${{ matrix.lightning-version }} | |
pip install -r requirements_test.txt | |
python init.py | |
- name: Set PYTHONPATH | |
run: echo "PYTHONPATH=$(pwd)/src" >> $GITHUB_ENV | |
- name: Run Simulation | |
run: python test/simulate/simulate_train_mnist_gan.py |